public Info()
 {
     InitializeComponent();
     this.Opacity = Class1.brightness / 1850;         //Brightness
     Info1.Volume = Class1.Volume;                    //Volume Music
     Info1.Play();                                    //Play Music
 }
Esempio n. 2
0
    public override void getInfo1(ref Info1 info)
    {
        info.m = 4;

        // see if we're powered or at a joint limit for axis 1
        int atlimit = 0;

        if ((limot0.lostop >= -Mathf.PI || limot0.histop <= Mathf.PI) &&
            limot0.lostop <= limot0.histop)
        {
            float angle = MeasureHinge2Angle();
            if (limot0.testRotationalLimit(angle))
            {
                atlimit = 1;
            }
        }
        if (atlimit != 0 || limot0.fmax > 0)
        {
            info.m++;
        }

        // see if we're powering axis 2 (we currently never limit this axis)
        limot1.limit = 0;
        if (limot1.fmax > 0)
        {
            info.m++;
        }
    }
        private void NewMethod(int newVlue)
        {
            if (_dp != null)
            {
                // DrawingGroup dg = new DrawingGroup();
                // var dc = dg.Open();
                // _dp.DrawPage(newVlue, dc, out _);
                // dc.Close();
                // var w = new DGWindow(dg);
                // w.Show();

                // Debug.WriteLine(dg.Bounds);

                var p = _dp.GetDocumentPage(newVlue, out var info);
                scroll.ScrollToTop();
                scroll.ScrollToLeftEnd();
                Info                 = info;
                pageBrush            = new VisualBrush(p.Visual);
                pageBrush.AlignmentX = AlignmentX.Left;
                pageBrush.AlignmentY = AlignmentY.Top;
                pageBrush.Stretch    = Stretch.None;
                var b1 = VisualTreeHelper.GetContentBounds(p.Visual);
                rect.Width  = b1.Width;
                rect.Height = b1.Height;
                // var zz = VisualTreeHelper.GetContentBounds(p.Visual);
                // b.Viewbox = zz;
                // b.ViewboxUnits = BrushMappingMode.Absolute;
                // b.Viewport = new Rect(0, 0, rect.ActualWidth, rect.ActualHeight);
                // b.ViewportUnits = BrushMappingMode.Absolute;

                Debug.WriteLine(rect.ActualWidth);
                Debug.WriteLine(rect.ActualHeight);
                rect.Fill = pageBrush;
            }
        }
Esempio n. 4
0
 // Use this for initialization
 void Start()
 {
     rend          = Info.GetComponent <Renderer>();
     rend.enabled  = false;
     rend2         = Info1.GetComponent <Renderer>();
     rend2.enabled = false;
     rend3         = Info2.GetComponent <Renderer>();
     rend3.enabled = false;
     rend4         = Info3.GetComponent <Renderer>();
     rend4.enabled = false;
 }
Esempio n. 5
0
        public bool heartbeat()
        {
            MySqlConnection connection;
            MySqlDataReader Info1;

            connection = new MySqlConnection(MyConString);
            MySqlCommand command     = connection.CreateCommand();
            MySqlCommand infocommand = connection.CreateCommand();

            connection.Open();
            try
            {
                infocommand.CommandText = "SET @a :=''; SET @b :=''; CALL AngelInfo('" + uid.ToString() + "',@a,@b);SELECT @a,@b;";
                Info1 = infocommand.ExecuteReader();
                if (Info1.Read() != false)
                {
                    string lastmac = Info1.GetString("@a");
                    if (lastmac == mymac) // Success
                    {
                        Info1.Close();
                        infocommand.CommandText = "CALL AngelInsertLogging('" + username.Text + "','" + ex_ip + "','" + l_ip + "','" + mymac + "'," + UnixTimeNow().ToString() + ",'" + program + "'," + theversion + "," + 8 + ");";
                        Info1 = infocommand.ExecuteReader();
                        Info1.Close();
                        connection.Close();
                        retrys = 0;
                        return(true);
                    }
                    else
                    {
                        infocommand.CommandText = "CALL AngelInsertLogging('" + username.Text + "','" + ex_ip + "','" + l_ip + "','" + mymac + "'," + UnixTimeNow().ToString() + ",'" + program + "'," + theversion + "," + 99 + ");";
                        Info1 = infocommand.ExecuteReader();
                        Info1.Close();
                        connection.Close();
                        return(false);
                    }
                }
                Info1.Close();
                connection.Close();
            }
            catch (Exception)
            {
                connection.Close();
                if (retrys > 2)
                {
                    return(false);
                }
                retrys++;
            };

            return(true);
        }
Esempio n. 6
0
        private void Enter_Click(object sender, RoutedEventArgs e)
        {
            obj.LukyNumberGenerate();
            var inputNumber = Input.Text;

            if (Validator(inputNumber))
            {
                OutPut.Document.Blocks.Clear();
                Info1.Clear();
                Print(inputNumber, obj, Chance);
            }
            else
            {
                OutPut.Document.Blocks.Clear();
                Info1.Text = "Sorry, but you entered a number that does not match the required parameters.";
            }
        }
Esempio n. 7
0
 public static bool operator ==(ClassInfo Info1, ClassInfo Info2)
 {
     if ((Info1 == null) || (Info2 == null))
     {
         if ((Info1 == null) && (Info2 == null))
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     else
     {
         return(Info1.Equals(Info2));
     }
 }
Esempio n. 8
0
        private DispatcherTimer readDataTimer = new DispatcherTimer();//通讯定时器类
        public SetWindow()
        {
            InitializeComponent();
            //CpuInfo1.SetBinding(TextBlock.TextProperty, new Binding("MaxTime_SchedLock") { Source = DataList });
            //CpuInfo2.SetBinding(TextBlock.TextProperty, new Binding("MaxTime_interrupt") { Source = DataList });
            //CpuInfo3.SetBinding(TextBlock.TextProperty, new Binding("CpuClikFreq") { Source = DataList });
            //CpuInfo4.SetBinding(TextBlock.TextProperty, new Binding("TaskCtxSwCtr") { Source = DataList });
            //CpuInfo5.SetBinding(TextBlock.TextProperty, new Binding("UcosVer") { Source = DataList });
            //CpuInfo6.SetBinding(TextBlock.TextProperty, new Binding("CPU_Usage") { Source = DataList });
            CpuInfo7.SetBinding(TextBlock.TextProperty, new Binding("CPU_MaxUsage")
            {
                Source = DataList
            });

            Info1.SetBinding(TextBlock.TextProperty, new Binding("Info1")
            {
                Source = DataList
            });
            Info2.SetBinding(TextBlock.TextProperty, new Binding("Info2")
            {
                Source = DataList
            });
            Info3.SetBinding(TextBlock.TextProperty, new Binding("Info3")
            {
                Source = DataList
            });
            Info4.SetBinding(TextBlock.TextProperty, new Binding("Info4")
            {
                Source = DataList
            });
            myGauge2.SetBinding(CircularGaugeControl.DialTextProperty, new Binding("CPU_Usage")
            {
                Source = DataList
            });
            myGauge2.SetBinding(CircularGaugeControl.CurrentValueProperty, new Binding("CPU_Usage")
            {
                Source = DataList
            });

            readDataTimer.Tick += new EventHandler(ShowCurTimer);//起个Timer一直获取当前时间
                        readDataTimer.Interval = new TimeSpan(0, 0, 0, 1, 0);

            readDataTimer.Start();
        }
        }                                                                                                 //Back To MainMenu

        private void media_MediaEnded(object sender, RoutedEventArgs e)                                   //ReStart The Music
        {                                                                                                 //ReStart The Music
            Info1.Stop();                                                                                 //ReStart The Music
            Info1.Play();                                                                                 //ReStart The Music
        }                                                                                                 //ReStart The Music
Esempio n. 10
0
 private void Clean_Click(object sender, RoutedEventArgs e)
 {
     OutPut.Document.Blocks.Clear();
     Input.Clear();
     Info1.Clear();
 }