當前位置: 首頁>>代碼示例>>C#>>正文


C# Models.System類代碼示例

本文整理匯總了C#中tscui.Models.System的典型用法代碼示例。如果您正苦於以下問題:C# System類的具體用法?C# System怎麽用?C# System使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


System類屬於tscui.Models命名空間,在下文中一共展示了System類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: btnRead_Click

 private void btnRead_Click(object sender, System.Windows.RoutedEventArgs e)
 {
     List<Plan> lp = t.ListPlan;
     foreach(Plan p in lp)
     {
         Console.WriteLine(p.usMonthFlag);
     }
 }
開發者ID:renhualu,項目名稱:tsccui32,代碼行數:8,代碼來源:BaseTimeView.xaml.cs

示例2: splLog_Loaded

        private void splLog_Loaded(object sender, System.Windows.RoutedEventArgs e)
        {
            //<SnippetListViewView>
            myListView = new ListView();
            //<SnippetGridViewColumn>

            //<SnippetGridViewAllowsColumnReorder>
            myGridView = new GridView();
            myGridView.AllowsColumnReorder = true;
            myGridView.ColumnHeaderToolTip = "日誌信息";
            //</SnippetGridViewAllowsColumnReorder>

            //<SnippetGridViewColumnProperties>
            GridViewColumn gvc1 = new GridViewColumn();
            gvc1.DisplayMemberBinding = new Binding("ucEventId");
            gvc1.Header = "日誌編號";
            gvc1.Width = 30;
            //</SnippetGridViewColumnProperties>
            myGridView.Columns.Add(gvc1);
            GridViewColumn gvc2 = new GridViewColumn();
            gvc2.DisplayMemberBinding = new Binding("sEventType");
            gvc2.Header = "日誌類型";
            gvc2.Width = 100;
            myGridView.Columns.Add(gvc2);
            //<SnippetAddToColumns>
            GridViewColumn gvc3 = new GridViewColumn();
            gvc3.DisplayMemberBinding = new Binding("ulEventTime");
            gvc3.Header = "日期時間";
            gvc3.Width = 120;
            myGridView.Columns.Add(gvc3);

            GridViewColumn gvc4 = new GridViewColumn();
            gvc4.DisplayMemberBinding = new Binding("sEventDesc");
            gvc4.Header = "日誌內容";
            gvc4.Width = 700;
            myGridView.Columns.Add(gvc4);
            //</SnippetAddToColumns>

            //</SnippetGridViewColumn>
            //ItemsSource is ObservableCollection of EmployeeInfo objects
            //myListView.ItemsSource = new myTscs();
            //Thread thread = new Thread();
            myListView.View = myGridView;
            myListView.Height = 550;
            // myListView.
            splLog.Children.Add(myListView);
            TscData td = (TscData)Application.Current.Properties[Define.TSC_DATA];
            if (td == null)
            {
                MessageBox.Show("請選擇一台信號機後,打開此界麵!");

            }
            else
            {
                myListView.ItemsSource = td.ListEventLog;
            }
        }
開發者ID:renhualu,項目名稱:tsccui32,代碼行數:57,代碼來源:LogsView.xaml.cs

示例3: Allday_Unchecked

 private void Allday_Unchecked(object sender, System.Windows.RoutedEventArgs e)
 {
     Monday.IsChecked = false;
     Thursday.IsChecked = false;
     Tuesday.IsChecked = false;
     Wednesday.IsChecked = false;
     Friday.IsChecked = false;
     Saturday.IsChecked = false;
     Sunday.IsChecked = false;
 }
開發者ID:renhualu,項目名稱:tsccui32,代碼行數:10,代碼來源:SeasonTimeView.xaml.cs

示例4: UserControl_Loaded

 private void UserControl_Loaded(object sender, System.Windows.RoutedEventArgs e)
 {
     TscData t = Utils.Utils.GetTscDataByApplicationCurrentProperties();
     if (t == null)
     {
         MessageBox.Show("請選擇一台信號機,以便進行配置!");
         return;
     }
     ObservableCollection<CntDownDev> occdd =  new ObservableCollection<CntDownDev>(t.ListCntDownDev);
     dgdVariableSign.ItemsSource = occdd;
 }
開發者ID:renhualu,項目名稱:tsccui32,代碼行數:11,代碼來源:VariableSignView.xaml.cs

示例5: Button_Click

 private void Button_Click(object sender, System.Windows.RoutedEventArgs e)
 {
     OpenFileDialog dialog = new OpenFileDialog();
     dialog.Filter = "Tsc Program(*.aiton)|*.aiton";
     dialog.Multiselect = false;
     
     //TextBox tb = sender as TextBox;
     if (dialog.ShowDialog() == true)
     {
         tbxFileName.Text = dialog.FileName;
     }
 }
開發者ID:renhualu,項目名稱:tsccui32,代碼行數:12,代碼來源:UpdateView.xaml.cs

示例6: Button_Click_1

        private void Button_Click_1(object sender, System.Windows.RoutedEventArgs e)
        {
            t = Utils.Utils.GetTscDataByApplicationCurrentProperties();
            Udp.sendUdpNoReciveData(t.Node.sIpAddress, t.Node.iPort, Define.UPDATE_TSC_START);
            Thread.Sleep(500);
            int result = FtpHelper.UploadFtp(tbxFileName.Text, t.Node.sIpAddress, Define.FTP_NAME, Define.FTP_PASSWD);
            Thread.Sleep(500);

            if(result == 0)
            {
                Udp.sendUdpNoReciveData(t.Node.sIpAddress, t.Node.iPort, Define.UPDATE_TSC_FINISH);
                MessageBox.Show("升級成功!");
            }
            else if (result == -2)
            {
                //升級失敗後,不要發送完成指令
                //Udp.sendUdpNoReciveData(t.Node.sIpAddress, t.Node.iPort, Define.UPDATE_TSC_FINISH);
                MessageBox.Show("上傳失敗");
            }
        }
開發者ID:renhualu,項目名稱:tsccui32,代碼行數:20,代碼來源:UpdateView.xaml.cs

示例7: ScrollViewer_MouseDoubleClick

 /// <summary>
 /// 雙擊,創建新的stage
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void ScrollViewer_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
 {
     //MessageBox.Show("addd stage");
     if (lsi[0] != stage1)
     {
         lsi.Reverse();
     }
     foreach(StageItem si in lsi)
     {
         if (si.Visibility == Visibility.Hidden)
         {
             si.Visibility = Visibility.Visible;
             createStageByInitArllowRed(si);
             break;
         }
     }
 }
開發者ID:renhualu,項目名稱:tsccui32,代碼行數:22,代碼來源:StageView.xaml.cs

示例8: ScrollViewer_MouseRightButtonDown

 private void ScrollViewer_MouseRightButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
 {
    // MessageBox.Show("del stage");
     TscData t = Utils.Utils.GetTscDataByApplicationCurrentProperties();
     if (lsi[0] == stage1)
     {
         lsi.Reverse();
     }
     foreach(StageItem si in lsi)
     {
         if (si.Visibility == Visibility.Visible)
         {
             si.Visibility = Visibility.Hidden;
             clearStageByDeleteStage(t,si);
             bigMapInitArllowRed();
             break;
         }
     }
 }
開發者ID:renhualu,項目名稱:tsccui32,代碼行數:19,代碼來源:StageView.xaml.cs

示例9: sldScheduleId_ValueChanged

 private void sldScheduleId_ValueChanged(object sender, System.Windows.RoutedPropertyChangedEventArgs<double> e)
 {
     t = Utils.Utils.GetTscDataByApplicationCurrentProperties();
     scheduleDataGrid.ItemsSource = initSchedule2DataGrid(t.ListSchedule);
 }
開發者ID:renhualu,項目名稱:tsccui32,代碼行數:5,代碼來源:ScheduleView.xaml.cs

示例10: Allday_IsEnabledChanged

        private void Allday_IsEnabledChanged(object sender, System.Windows.DependencyPropertyChangedEventArgs e)
        {

        }
開發者ID:renhualu,項目名稱:tsccui32,代碼行數:4,代碼來源:SeasonTimeView.xaml.cs

示例11: UserControl_Loaded

        private void UserControl_Loaded(object sender, System.Windows.RoutedEventArgs e)
        {
            try
            {
                td = (TscData)Application.Current.Properties[Define.TSC_DATA];
                initScheduleId();
                if (td == null)
                {
                    return;
                }
                List<Plan> lp = td.ListPlan;
                foreach(Plan p in lp)
                {
                    //如果沒有數據不會進入
                    if (p.ucId>=21 && p.ucId <=30)
                    {
                        ///Summer.IsChecked = true;
                        lbxPlanId.Items.Add(p.ucId);
                        //initWeekdayDisplay(p.ucWeekFlag);

                    }
                    
                }


                cbxScheduleId.SelectedItem = (byte)1;
            }
            catch(Exception ex)
            {
                //MessageBox.Show(ex.ToString());
                //ApexBroker.GetShell().ShowPopup(new FailePopup());
            }
        }
開發者ID:renhualu,項目名稱:tsccui32,代碼行數:33,代碼來源:SeasonTimeView.xaml.cs

示例12: collision6_MouseDown

 private void collision6_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
 {
     currentCollision = collision6;
     BigMap4SmallMap(currentCollision);
 }
開發者ID:renhualu,項目名稱:tsccui32,代碼行數:5,代碼來源:CollisionView.xaml.cs

示例13: southOther_MouseRightButtonDown

 private void southOther_MouseRightButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
 {
     if (currentCollision == null)
     {
         
         MessageBox.Show("請選擇一個衝突相位,以便進行設置!");
         return;
     }
     List<PhaseToDirec> lptd = t.ListPhaseToDirec;
     List<tscui.Models.Collision> lc = t.ListCollision;
     foreach (PhaseToDirec ptd in lptd)
     {
         if (ptd.ucId == Define.SOUTH_OTHER)
         {
             //ptd.ucPhase;
             byte collisionId = Convert.ToByte(currentCollision.lblId.Content);
             foreach (tscui.Models.Collision c in lc)
             {
                 if (collisionId == c.ucPhaseId)
                 {
                     collisionFlagResetPhaseBit(c, ptd);
                     Console.WriteLine(c.ucCollisionFlag);
                 }
             }
         }
     }
     currentCollision.southOther.Source = new BitmapImage(new Uri("/tscui;component/Resources/Images/nolight.png", UriKind.Relative));
     southOther.Source = new BitmapImage(new Uri("/tscui;component/Resources/Images/nolight.png", UriKind.Relative));
 }
開發者ID:renhualu,項目名稱:tsccui32,代碼行數:29,代碼來源:CollisionView.xaml.cs

示例14: westStraight_MouseDown

 private void westStraight_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
 {
     
 }
開發者ID:renhualu,項目名稱:tsccui32,代碼行數:4,代碼來源:StageView.xaml.cs

示例15: stage16_MouseDown

 private void stage16_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
 {
     currentStage = stage16;
     smallMap4Form(currentStage);
     BigMap4SmallMap(currentStage); //MessageBox.Show("stage1");
 }
開發者ID:renhualu,項目名稱:tsccui32,代碼行數:6,代碼來源:StageView.xaml.cs


注:本文中的tscui.Models.System類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。