示例#1
0
        private void addwrench_Click(object sender, RoutedEventArgs e)
        {
            editerWrench ew = new editerWrench();

            this.main.Children.Clear();
            this.main.Children.Add(ew);
        }
示例#2
0
        private void Mainwindow_Loaded(object sender, RoutedEventArgs e)
        {
            // this.WindowState = System.Windows.WindowState.Normal;
            //  this.WindowStyle = System.Windows.WindowStyle.None;
            //this.ResizeMode = System.Windows.ResizeMode.NoResize;

            this.Left   = 0.0;
            this.Top    = 0.0;
            this.Width  = System.Windows.SystemParameters.PrimaryScreenWidth;
            this.Height = System.Windows.SystemParameters.PrimaryScreenHeight;
            show();
            if (this.cf == null)
            {
                this.main.Children.Add(cf = new CheckFinal(ruc, rct1, rct2));
                cf.SetSerialPort          = EncoderPlcPort;
            }
            else
            {
                this.main.Children.Add(cf);
            }
            this.user.Content = "当前登录用户:" + SystData.userInfo.user.username;
            //    l = new Login(this);
            //this.main.Children.Clear();
            //this.main.Children.Add(l);
            ew = new editerWrench();
            List <systemcheckset> ls = new List <systemcheckset>();

            try
            {
                ls = SerializeXML <systemcheckset> .Getlist();

                if (ls != null && ls.Count > 0)
                {
                    if (ls.FirstOrDefault().noticeshow)
                    {
                        //this.taskbarNotifier.Show();
                        //this.taskbarNotifier.NotifyContent.Clear();
                        //this.taskbarNotifier.NotifyContent.Add(new NotifyObject(GetWrenchList(Convert.ToInt32(ls.FirstOrDefault().noticedays))));
                        //WinWrenchRepair WinWrenchRepair = new WinWrenchRepair(GetWrenchList(Convert.ToInt32(ls.FirstOrDefault().noticedays)));
                        //WinWrenchRepair.Show();
                    }
                }
            }
            catch { }
        }