コード例 #1
0
ファイル: Eyes.cs プロジェクト: Tamegoro/AGENT
        public static void Main()
        {
            _display = new Bitmap(Bitmap.MaxWidth, Bitmap.MaxHeight);

            currentTime = new DateTime();

            _azmdrawing = new AZMDrawing();
            _point = new AGENT.AZMutil.Point();

            colorBackground = Color.Black;
            colorForeground = Color.White;

            UpdateTime(null);

            currentTime = DateTime.Now;

            dueTime = new TimeSpan(0, 0, 0, 59 - currentTime.Second, 1000 - currentTime.Millisecond);
            period = new TimeSpan(0, 0, 1, 0, 0);

            _updateClockTimer = new Timer(UpdateTime, null, dueTime, period); // start our update timer

            ButtonHelper.Current.OnButtonPress += Current_OnButtonPress;

            Thread.Sleep(Timeout.Infinite);
        }
コード例 #2
0
ファイル: HandWriting.cs プロジェクト: Tamegoro/AGENT
        public static void Main()
        {
            _display = new Bitmap(Bitmap.MaxWidth, Bitmap.MaxHeight);

            _azmdrawing = new AZMDrawing();

            colorForeground = new Color();
            colorBackground = new Color();
            colorBackgroundOld = new Color();
            colorEraser = new Color();

            screenWidth = _display.Width;
            screenHeight = _display.Height;

            screenCenterX = screenWidth / 2;
            screenCenterY = screenHeight / 2;

            _bmpEraser = new Bitmap(Resources.GetBytes(Resources.BinaryResources.Eraser), Bitmap.BitmapImageType.Gif);

            eraserWidth = _bmpEraser.Width;
            eraserHeight =_bmpEraser.Height;

            eraserCenterX = eraserWidth / 2;
            eraserCenterY = eraserHeight / 2;

            _bmpEraserWork = new Bitmap(eraserWidth, eraserHeight);

            currentTime = new DateTime();
            currentTime = DateTime.Now;

            dueTime = new TimeSpan(0, 0, 0, 59 - currentTime.Second, 1000 - currentTime.Millisecond);
            period = new TimeSpan(0, 0, 1, 0, 0);

            dueTimeHandWriting = new TimeSpan(0, 0, 0, 0, 0);
            periodHandWriting = new TimeSpan(0, 0, 0, 0, MILLISECOND_HAND_WRITING_INTERVAL);

            dueTimeDigital = new TimeSpan(0, 0, 0, 0, 1000 - currentTime.Millisecond);
            periodDigital = new TimeSpan(0, 0, 0, 1, 0);

            displayMode = DISPLAY_MODE_BLACK_12;
            SetDisplayMode(displayMode);
            //_bmpEraserWork.DrawImage(0, 0, _bmpEraser, 0, 0, eraserWidth, eraserHeight);
            //colorEraser = Color.Black;

            eraser = false;
            oldMM = -1;

            UpdateTime(null);

            _updateClockTimer = new Timer(UpdateTime, null, dueTime, period);

            ButtonHelper.ButtonSetup = new Buttons[]
            {
                Buttons.BottomRight, Buttons.MiddleRight, Buttons.TopRight
            };

            ButtonHelper.Current.OnButtonPress += Current_OnButtonPress;

            Thread.Sleep(Timeout.Infinite);
        }
コード例 #3
0
ファイル: WaxingAndWaning2.cs プロジェクト: Tamegoro/AGENT
        public static void Main()
        {
            _display = new Bitmap(Bitmap.MaxWidth, Bitmap.MaxHeight);

            _azmdrawing = new AZMDrawing();

            screenWidth = _display.Width;
            screenHeight = _display.Height;

            screenCenterX = screenWidth / 2;
            screenCenterY = screenHeight / 2;

            colorForeground = Color.White;
            colorBackground = Color.Black;

            showDigital = false;

            currentTime = new DateTime();
            currentTime = DateTime.Now;

            UpdateTime(null);

            currentTime = DateTime.Now;

            dueTime = new TimeSpan(0, 0, 0, 0, 1000 - currentTime.Millisecond);
            period = new TimeSpan(0, 0, 0, 1, 0);

            _updateClockTimer = new Timer(UpdateTime, null, dueTime, period);

            ButtonHelper.Current.OnButtonPress += Current_OnButtonPress;

            Thread.Sleep(Timeout.Infinite);
        }
コード例 #4
0
ファイル: AnalogFlipClock.cs プロジェクト: Tamegoro/AGENT
        public static void Main()
        {
            _display = new Bitmap(Bitmap.MaxWidth, Bitmap.MaxHeight);

            currentTime = new DateTime();

            colorForeground = new Color();
            colorBackground = new Color();

            _azmdrawing = new AZMDrawing();
            _point = new AGENT.AZMutil.Point();

            screenWidth = _display.Width;
            screenHeight = _display.Height;

            screenCenterX = screenWidth / 2;
            screenCenterY = screenHeight / 2;

            panelWidth = screenWidth - (MARGIN_PANEL_EDGE * 2);
            panelHeight = (screenHeight - ((MARGIN_PANEL_EDGE * 2) + MARGIN_PANEL_PANEL)) / 2;

            panelCenterX = panelWidth / 2;

            _bmpwork = new Bitmap(panelWidth, panelHeight);

            displayMode = DISPLAY_MODE_WHITE;
            colorForeground = Color.Black;
            colorBackground = Color.White;

            currentTime = DateTime.Now;
            currentH = currentTime.Hour;
            currentM = currentTime.Minute;
            oldH = currentH;
            oldM = currentM;

            UpdateTime(null);

            dueTime = new TimeSpan(0, 0, 0, 59 - currentTime.Second, 1000 - currentTime.Millisecond);
            period = new TimeSpan(0, 0, 1, 0, 0);

            dueTimeDigital = new TimeSpan(0, 0, 0, 0, 1000 - currentTime.Millisecond);
            periodDigital = new TimeSpan(0, 0, 0, 1, 0);

            dueTimeFlip = new TimeSpan(0, 0, 0, 0, 0);
            periodFlip = new TimeSpan(0, 0, 0, 0, 100);

            _updateClockTimer = new Timer(UpdateTime, null, dueTime, period);

            ButtonHelper.ButtonSetup = new Buttons[]
            {
                Buttons.BottomRight, Buttons.MiddleRight, Buttons.TopRight
            };

            ButtonHelper.Current.OnButtonPress += Current_OnButtonPress;

            Thread.Sleep(Timeout.Infinite);
        }
コード例 #5
0
ファイル: Beard.cs プロジェクト: Tamegoro/AGENT
        public static void Main()
        {
            _display = new Bitmap(Bitmap.MaxWidth, Bitmap.MaxHeight);

            _bmpFace = new Bitmap(Resources.GetBytes(Resources.BinaryResources.BeardFace), Bitmap.BitmapImageType.Gif);
            _bmpHourHand = new Bitmap(Resources.GetBytes(Resources.BinaryResources.BeardLeft), Bitmap.BitmapImageType.Gif);
            _bmpMinuteHand = new Bitmap(Resources.GetBytes(Resources.BinaryResources.BeardRight), Bitmap.BitmapImageType.Gif);

            _azmdrawing = new AZMDrawing();
            _point = new AGENT.AZMutil.Point();

            colorForeground = new Color();
            colorBackground = new Color();

            screenWidth = _display.Width;
            screenHeight = _display.Height;

            screenCenterX = screenWidth / 2;
            screenCenterY = screenHeight / 2;

            hourHandWidth = _bmpHourHand.Width;
            hourHandHeight = _bmpHourHand.Height;

            minuteHandWidth = _bmpMinuteHand.Width;
            minuteHandHeight = _bmpMinuteHand.Height;

            _bmpRotateHourHand = new Bitmap(hourHandWidth, hourHandHeight);
            _bmpRotateMinuteHand = new Bitmap(minuteHandWidth, minuteHandHeight);

            displayMode = DISPLAY_MODE_WHITE;
            blackOrWhite = BLACK;
            SetDisplayMode(displayMode);

            showDigital = false;

            currentTime = new DateTime();

            UpdateTime(null);

            dueTime = new TimeSpan(0, 0, 0, 59 - currentTime.Second, 1000 - currentTime.Millisecond);
            period = new TimeSpan(0, 0, 1, 0, 0);

            dueTimeDigital = new TimeSpan(0, 0, 0, 0, 1000 - currentTime.Millisecond);
            periodDigital = new TimeSpan(0, 0, 0, 1, 0);

            _updateClockTimer = new Timer(UpdateTime, null, dueTime, period);

            ButtonHelper.ButtonSetup = new Buttons[]
            {
                Buttons.BottomRight, Buttons.MiddleRight, Buttons.TopRight
            };

            ButtonHelper.Current.OnButtonPress += Current_OnButtonPress;

            Thread.Sleep(Timeout.Infinite);
        }
コード例 #6
0
ファイル: TallyMarks.cs プロジェクト: Tamegoro/AGENT
        public static void Main()
        {
            _display = new Bitmap(Bitmap.MaxWidth, Bitmap.MaxHeight);

            _azmdrawing = new AZMDrawing();

            screenWidth = _display.Width;
            screenHeight = _display.Height;

            screenCenterX = screenWidth / 2;
            screenCenterY = screenHeight / 2;

            topH = ((screenHeight - ((HEIGHT_MARK * 5) + (MARGIN_MARK_MARK * 2) + (MARGIN_MARK_LINE * 4) + (THICKNESS_LINE * 2))) / 2) - (((screenHeight - ((HEIGHT_MARK * 5) + (MARGIN_MARK_MARK * 2) + (MARGIN_MARK_LINE * 4) + (THICKNESS_LINE * 2))) / 2) % 2);

            topLine1 = topH + ((HEIGHT_MARK * 1) + (MARGIN_MARK_MARK * 0) + (MARGIN_MARK_LINE * 1) + (THICKNESS_LINE * 0));

            topMLower = topH + ((HEIGHT_MARK * 1) + (MARGIN_MARK_MARK * 0) + (MARGIN_MARK_LINE * 2) + (THICKNESS_LINE * 1));
            topMUpper = topH + ((HEIGHT_MARK * 2) + (MARGIN_MARK_MARK * 1) + (MARGIN_MARK_LINE * 2) + (THICKNESS_LINE * 1));

            topLine2 = topH + ((HEIGHT_MARK * 3) + (MARGIN_MARK_MARK * 1) + (MARGIN_MARK_LINE * 3) + (THICKNESS_LINE * 1));

            topSLower = topH + ((HEIGHT_MARK * 3) + (MARGIN_MARK_MARK * 1) + (MARGIN_MARK_LINE * 4) + (THICKNESS_LINE * 2));
            topSUpper = topH + ((HEIGHT_MARK * 4) + (MARGIN_MARK_MARK * 2) + (MARGIN_MARK_LINE * 4) + (THICKNESS_LINE * 2));

            marginLeft = (screenWidth - (fontTallyMarksOccidental18.CharWidth('0') * 6)) / 2;

            displayMode = DISPLAY_MODE_BLACK_OCCIDENTAL;
            SetDisplayMode();

            showDigital = false;

            currentTime = new DateTime();
            currentTime = DateTime.Now;

            UpdateTime(null);

            dueTime = new TimeSpan(0, 0, 0, 0, 1000 - currentTime.Millisecond);
            period = new TimeSpan(0, 0, 0, 1, 0);

            _updateClockTimer = new Timer(UpdateTime, null, dueTime, period);

            ButtonHelper.ButtonSetup = new Buttons[]
            {
                Buttons.BottomRight, Buttons.MiddleRight, Buttons.TopRight
            };

            ButtonHelper.Current.OnButtonPress += Current_OnButtonPress;

            Thread.Sleep(Timeout.Infinite);
        }
コード例 #7
0
ファイル: Floating.cs プロジェクト: Tamegoro/AGENT
        public static void Main()
        {
            _display = new Bitmap(Bitmap.MaxWidth, Bitmap.MaxHeight);

            _azmdrawing = new AZMDrawing();
            _point = new AGENT.AZMutil.Point();

            screenWidth = _display.Width;
            screenHeight = _display.Height;

            screenCenterX = screenWidth / 2;
            screenCenterY = screenHeight / 2;

            diskRadius = screenWidth / DISK_RATIO;

            displayMode = DISPLAY_MODE_BLACK;
            colorForeground = Color.White;
            colorBackground = Color.Black;
            colorDisk = Color.Black;

            showDigital = false;

            currentTime = new DateTime();
            currentTime = DateTime.Now;

            _random = new Random(currentTime.Millisecond);

            _point.X = screenCenterX;
            _point.Y = screenCenterY;

            randomDegree = 0;

            UpdateTime(null);

            currentTime = DateTime.Now;

            dueTime = new TimeSpan(0, 0, 0, 0, 1000 - currentTime.Millisecond);
            period = new TimeSpan(0, 0, 0, 0, MOVE_INTERVAL);

            _updateClockTimer = new Timer(UpdateTime, null, dueTime, period);

            ButtonHelper.ButtonSetup = new Buttons[]
            {
                Buttons.BottomRight, Buttons.MiddleRight, Buttons.TopRight
            };

            ButtonHelper.Current.OnButtonPress += Current_OnButtonPress;

            Thread.Sleep(Timeout.Infinite);
        }
コード例 #8
0
ファイル: KanjiNumerals.cs プロジェクト: Tamegoro/AGENT
        public static void Main()
        {
            _display = new Bitmap(Bitmap.MaxWidth, Bitmap.MaxHeight);

            _azmdrawing = new AZMDrawing();
            _point = new AGENT.AZMutil.Point();

            colorForeground = new Color();
            colorBackground = new Color();

            screenWidth = _display.Width;
            screenHeight = _display.Height;

            screenCenterX = screenWidth / 2;
            screenCenterY = screenHeight / 2;

            fontWidth = fontIPAexGothicKansuji05.CharWidth('零');
            fontHeight = fontIPAexGothicKansuji05.Height;

            marginX = (screenWidth - (fontWidth * 13) - (MARGIN_NUMBER_NUMBER_X * 4)) / 2;
            marginY = (screenHeight - (fontHeight * 5)) / 2;

            displayMode = DISPLAY_MODE_BLACK_12;
            SetDisplayMode(displayMode);

            showDigital = false;

            currentTime = new DateTime();

            UpdateTime(null);

            dueTime = new TimeSpan(0, 0, 0, 59 - currentTime.Second, 1000 - currentTime.Millisecond);
            period = new TimeSpan(0, 0, 1, 0, 0);

            dueTimeDigital = new TimeSpan(0, 0, 0, 0, 1000 - currentTime.Millisecond);
            periodDigital = new TimeSpan(0, 0, 0, 1, 0);

            _updateClockTimer = new Timer(UpdateTime, null, dueTime, period);

            ButtonHelper.ButtonSetup = new Buttons[]
            {
                Buttons.BottomRight, Buttons.MiddleRight, Buttons.TopRight
            };

            ButtonHelper.Current.OnButtonPress += Current_OnButtonPress;

            Thread.Sleep(Timeout.Infinite);
        }
コード例 #9
0
ファイル: BubbleSheet.cs プロジェクト: Tamegoro/AGENT
        public static void Main()
        {
            _display = new Bitmap(Bitmap.MaxWidth, Bitmap.MaxHeight);

            _azmdrawing = new AZMDrawing();
            _point = new AGENT.AZMutil.Point();

            colorForeground = new Color();
            colorBackground = new Color();

            screenWidth = _display.Width;
            screenHeight = _display.Height;

            screenCenterX = screenWidth / 2;
            screenCenterY = screenHeight / 2;

            gapX = (screenWidth - (SIZE_HOLE * 6)) / 5;
            gapY = (screenHeight - (SIZE_HOLE * 10)) / 9;

            margineX = (screenWidth - ((SIZE_HOLE * 6) + (gapX * 5))) / 2;
            margineY = (screenHeight - ((SIZE_HOLE * 10) + (gapY * 9))) / 2;

            displayMode = DISPLAY_MODE_BLACK_CIRCLE_12;
            SetDisplayMode(displayMode);

            showDigital = false;

            currentTime = new DateTime();

            UpdateTime(null);

            dueTime = new TimeSpan(0, 0, 0, 0, 1000 - currentTime.Millisecond);
            period = new TimeSpan(0, 0, 0, 1, 0);

            dueTimeDigital = new TimeSpan(0, 0, 0, 0, 1000 - currentTime.Millisecond);
            periodDigital = new TimeSpan(0, 0, 0, 1, 0);

            _updateClockTimer = new Timer(UpdateTime, null, dueTime, period);

            ButtonHelper.ButtonSetup = new Buttons[]
            {
                Buttons.BottomRight, Buttons.MiddleRight, Buttons.TopRight
            };

            ButtonHelper.Current.OnButtonPress += Current_OnButtonPress;

            Thread.Sleep(Timeout.Infinite);
        }
コード例 #10
0
ファイル: NumeralHand.cs プロジェクト: Tamegoro/AGENT
        public static void Main()
        {
            _display = new Bitmap(Bitmap.MaxWidth, Bitmap.MaxHeight);

            bmpRotate = new Bitmap(Bitmap.MaxWidth, Bitmap.MaxHeight);
            bmpHandBlack = new Bitmap(Resources.GetBytes(Resources.BinaryResources.NumeralHandBlack), Bitmap.BitmapImageType.Gif);
            bmpHandWhite = new Bitmap(Resources.GetBytes(Resources.BinaryResources.NumeralHandWhite), Bitmap.BitmapImageType.Gif);

            _azmdrawing = new AZMDrawing();
            _point = new AGENT.AZMutil.Point();

            screenWidth = _display.Width;
            screenHeight = _display.Height;

            screenCenterX = screenWidth / 2;
            screenCenterY = screenHeight / 2;

            displayMode = DISPLAY_MODE_BLACK;
            showDate = false;
            colorForeground = Color.White;
            colorBackground = Color.Black;

            showDigital = false;

            currentTime = new DateTime();
            currentTime = DateTime.Now;

            UpdateTime(null);

            currentTime = DateTime.Now;

            dueTime = new TimeSpan(0, 0, 0, 59 - currentTime.Second, 1000 - currentTime.Millisecond);
            period = new TimeSpan(0, 0, 1, 0, 0);

            dueTimeDigital = new TimeSpan(0, 0, 0, 0, 1000 - currentTime.Millisecond);
            periodDigital = new TimeSpan(0, 0, 0, 1, 0);

            _updateClockTimer = new Timer(UpdateTime, null, dueTime, period);

            ButtonHelper.ButtonSetup = new Buttons[]
            {
                Buttons.BottomRight, Buttons.MiddleRight, Buttons.TopRight
            };

            ButtonHelper.Current.OnButtonPress += Current_OnButtonPress;

            Thread.Sleep(Timeout.Infinite);
        }
コード例 #11
0
ファイル: Radar.cs プロジェクト: Tamegoro/AGENT
        public static void Main()
        {
            _display = new Bitmap(Bitmap.MaxWidth, Bitmap.MaxHeight);

            _azmdrawing = new AZMDrawing();
            _point = new AGENT.AZMutil.Point();

            screenWidth = _display.Width;
            screenHeight = _display.Height;

            screenCenterX = screenWidth / 2;
            screenCenterY = screenHeight / 2;

            circleRadius = screenCenterX - MARGIN_CIRCLE_EDGE;

            showHourCounter = 0;
            radiusHour = 0;

            showMinuteCounter = 0;
            radiusMinute = 0;

            displayMode = DISPLAY_MODE_BLACK;
            SetDisplayMode();

            showDigital = false;

            currentTime = new DateTime();
            currentTime = DateTime.Now;

            _random = new Random(currentTime.Millisecond);

            UpdateTime(null);

            dueTime = new TimeSpan(0, 0, 0, 0, 1000 - currentTime.Millisecond);
            period = new TimeSpan(0, 0, 0, 1, 0);

            _updateClockTimer = new Timer(UpdateTime, null, dueTime, period);

            ButtonHelper.ButtonSetup = new Buttons[]
            {
                Buttons.BottomRight, Buttons.MiddleRight, Buttons.TopRight
            };

            ButtonHelper.Current.OnButtonPress += Current_OnButtonPress;

            Thread.Sleep(Timeout.Infinite);
        }
コード例 #12
0
ファイル: Football.cs プロジェクト: Tamegoro/AGENT
        public static void Main()
        {
            _display = new Bitmap(Bitmap.MaxWidth, Bitmap.MaxHeight);

            _background = new Bitmap(Resources.GetBytes(Resources.BinaryResources.football), Bitmap.BitmapImageType.Gif);

            _azmdrawing = new AZMDrawing();
            _point = new AGENT.AZMutil.Point();

            screenWidth = _display.Width;
            screenHeight = _display.Height;

            screenCenterX = screenWidth / 2;
            screenCenterY = screenHeight / 2;

            backgroundWidth = _background.Width;
            backgroundHeight = _background.Height;

            displayMode = DISPLAY_MODE_BLACK_FRAHAND;
            SetDisplayMode(displayMode);

            showDigital = false;

            currentTime = new DateTime();

            UpdateTime(null);

            //dueTime = new TimeSpan(0, 0, 0, 0, 1000 - currentTime.Millisecond);
            //period = new TimeSpan(0, 0, 0, 1, 0);

            dueTime = new TimeSpan(0, 0, 0, 59 - currentTime.Second, 1000 - currentTime.Millisecond);
            period = new TimeSpan(0, 0, 1, 0, 0);

            _updateClockTimer = new Timer(UpdateTime, null, dueTime, period);

            ButtonHelper.ButtonSetup = new Buttons[]
            {
                Buttons.BottomRight, Buttons.MiddleRight, Buttons.TopRight
            };

            ButtonHelper.Current.OnButtonPress += Current_OnButtonPress;

            Thread.Sleep(Timeout.Infinite);
        }
コード例 #13
0
ファイル: RomanNumerals.cs プロジェクト: Tamegoro/AGENT
        public static void Main()
        {
            _display = new Bitmap(Bitmap.MaxWidth, Bitmap.MaxHeight);

            _azmdrawing = new AZMDrawing();
            _point = new AGENT.AZMutil.Point();

            screenWidth = _display.Width;
            screenHeight = _display.Height;

            screenCenterX = screenWidth / 2;
            screenCenterY = screenHeight / 2;

            distanceOuterCircle = screenCenterX - MARGIN_OUTER_CIRCLE_EDGE;
            distanceInnerCircle = screenCenterX - (MARGIN_OUTER_CIRCLE_EDGE + THICKNESS_CIRCLE + MARGIN_INNER_CIRCLE_OUTER_CIRCLE);

            displayMode = DISPLAY_MODE_BLACK;
            SetDisplayMode(displayMode);

            showDigital = false;

            currentTime = new DateTime();

            oldM = -1;

            UpdateTime(null);

            dueTime = new TimeSpan(0, 0, 0, 0, 1000 - currentTime.Millisecond);
            period = new TimeSpan(0, 0, 0, 1, 0);

            //dueTime = new TimeSpan(0, 0, 0, 59 - currentTime.Second, 1000 - currentTime.Millisecond);
            //period = new TimeSpan(0, 0, 1, 0, 0);

            _updateClockTimer = new Timer(UpdateTime, null, dueTime, period);

            ButtonHelper.ButtonSetup = new Buttons[]
            {
                Buttons.BottomRight, Buttons.MiddleRight, Buttons.TopRight
            };

            ButtonHelper.Current.OnButtonPress += Current_OnButtonPress;

            Thread.Sleep(Timeout.Infinite);
        }
コード例 #14
0
ファイル: PeepHole.cs プロジェクト: Tamegoro/AGENT
        public static void Main()
        {
            _display = new Bitmap(Bitmap.MaxWidth, Bitmap.MaxHeight);

            _azmdrawing = new AZMDrawing();
            _point = new AGENT.AZMutil.Point();

            screenWidth = _display.Width;
            screenHeight = _display.Height;

            screenCenterX = screenWidth / 2;
            screenCenterY = screenHeight / 2;

            displayMode = DISPLAY_MODE_WHITE;
            isPeep = false;
            //displayMode = DISPLAY_MODE_PEEP_WHITE;
            //isPeep = true;
            showDate = false;
            colorForeground = Color.Black;
            colorBackground = Color.White;

            showDigital = false;

            currentTime = new DateTime();
            currentTime = DateTime.Now;

            UpdateTime(null);

            currentTime = DateTime.Now;

            dueTime = new TimeSpan(0, 0, 0, 0, 1000 - currentTime.Millisecond);
            period = new TimeSpan(0, 0, 0, 1, 0);

            _updateClockTimer = new Timer(UpdateTime, null, dueTime, period);

            ButtonHelper.ButtonSetup = new Buttons[]
            {
                Buttons.BottomRight, Buttons.MiddleRight, Buttons.TopRight
            };

            ButtonHelper.Current.OnButtonPress += Current_OnButtonPress;

            Thread.Sleep(Timeout.Infinite);
        }
コード例 #15
0
ファイル: WaxingAndWaning.cs プロジェクト: Tamegoro/AGENT
        public static void Main()
        {
            _display = new Bitmap(Bitmap.MaxWidth, Bitmap.MaxHeight);

            currentTime = new DateTime();

            _azmdrawing = new AZMDrawing();
            _point = new AGENT.AZMutil.Point();

            screenWidth = _display.Width;
            screenHeight = _display.Height;

            screenCenterX = screenWidth / 2;
            screenCenterY = screenHeight / 2;

            radius = screenCenterX - radiusMod;

            displayMode = DISPLAY_MODE_WHITE;

            //displayMode = DISPLAY_MODE_BLACK;

            UpdateTime(null);

            currentTime = DateTime.Now;

            dueTime = new TimeSpan(0, 0, 0, 59 - currentTime.Second, 1000 - currentTime.Millisecond);
            period = new TimeSpan(0, 0, 1, 0, 0);

            dueTimeDigital = new TimeSpan(0, 0, 0, 0, 1000 - currentTime.Millisecond);
            periodDigital = new TimeSpan(0, 0, 0, 1, 0);

            _updateClockTimer = new Timer(UpdateTime, null, dueTime, period);

            ButtonHelper.ButtonSetup = new Buttons[]
            {
                Buttons.BottomRight, Buttons.MiddleRight, Buttons.TopRight
            };

            ButtonHelper.Current.OnButtonPress += Current_OnButtonPress;

            Thread.Sleep(Timeout.Infinite);
        }
コード例 #16
0
ファイル: SpinningDisk.cs プロジェクト: Tamegoro/AGENT
        public static void Main()
        {
            _display = new Bitmap(Bitmap.MaxWidth, Bitmap.MaxHeight);

            _background = new Bitmap(Resources.GetBytes(Resources.BinaryResources.SpinningDiskBackground), Bitmap.BitmapImageType.Gif);

            currentTime = new DateTime();

            colorForeground = new Color();
            colorBackground = new Color();

            _azmdrawing = new AZMDrawing();
            _point = new AGENT.AZMutil.Point();

            screenWidth = _display.Width;
            screenHeight = _display.Height;

            screenCenterX = screenWidth / 2;
            screenCenterY = screenHeight / 2;

            backgroundWidth = _background.Width;
            backgroundHeight = _background.Height;

            colorForeground = Color.Black;
            colorBackground = Color.White;

            UpdateTime(null);

            currentTime = DateTime.Now;

            dueTime = new TimeSpan(0, 0, 0, 59 - currentTime.Second, 1000 - currentTime.Millisecond);
            period = new TimeSpan(0, 0, 1, 0, 0);

            dueTimeDigital = new TimeSpan(0, 0, 0, 0, 1000 - currentTime.Millisecond);
            periodDigital = new TimeSpan(0, 0, 0, 1, 0);

            _updateClockTimer = new Timer(UpdateTime, null, dueTime, period);

            ButtonHelper.Current.OnButtonPress += Current_OnButtonPress;

            Thread.Sleep(Timeout.Infinite);
        }
コード例 #17
0
ファイル: PeepWindow.cs プロジェクト: Tamegoro/AGENT
        public static void Main()
        {
            _display = new Bitmap(Bitmap.MaxWidth, Bitmap.MaxHeight);

            currentTime = new DateTime();

            colorForeground = new Color();
            colorBackground = new Color();

            _azmdrawing = new AZMDrawing();

            screenWidth = _display.Width;
            screenHeight = _display.Height;

            displayMode = DISPLAY_MODE_WHITE_POIHAND;
            handType = HAND_TYPE_POINT;
            showSecond = false;
            showDate = false;
            colorForeground = Color.Black;
            colorBackground = Color.White;

            oldM = -1;

            UpdateTime(null);

            currentTime = DateTime.Now;

            dueTime = new TimeSpan(0, 0, 0, 0, 1000 - currentTime.Millisecond);
            period = new TimeSpan(0, 0, 0, 1, 0);

            _updateClockTimer = new Timer(UpdateTime, null, dueTime, period);

            ButtonHelper.ButtonSetup = new Buttons[]
            {
                Buttons.BottomRight, Buttons.MiddleRight, Buttons.TopRight
            };

            ButtonHelper.Current.OnButtonPress += Current_OnButtonPress;

            Thread.Sleep(Timeout.Infinite);
        }
コード例 #18
0
ファイル: SimplePart03.cs プロジェクト: Tamegoro/AGENT
        public static void Main()
        {
            _display = new Bitmap(Bitmap.MaxWidth, Bitmap.MaxHeight);

            _azmdrawing = new AZMDrawing();

            screenWidth = _display.Width;
            screenHeight = _display.Height;

            screenCenterX = screenWidth / 2;
            screenCenterY = screenHeight / 2;

            lengthHand = (screenCenterX - (MARGIN_DISK_EDGE + THICKNESS_DISK)) / 3 + 1;

            displayMode = DISPLAY_MODE_BLACK;
            colorForeground = Color.White;
            colorBackground = Color.Black;

            showDigital = false;

            currentTime = new DateTime();
            currentTime = DateTime.Now;

            UpdateTime(null);

            currentTime = DateTime.Now;

            dueTime = new TimeSpan(0, 0, 0, 0, 1000 - currentTime.Millisecond);
            period = new TimeSpan(0, 0, 0, 1, 0);

            _updateClockTimer = new Timer(UpdateTime, null, dueTime, period);

            ButtonHelper.ButtonSetup = new Buttons[]
            {
                Buttons.BottomRight, Buttons.MiddleRight, Buttons.TopRight
            };

            ButtonHelper.Current.OnButtonPress += Current_OnButtonPress;

            Thread.Sleep(Timeout.Infinite);
        }
コード例 #19
0
ファイル: PendulumClock.cs プロジェクト: Tamegoro/AGENT
        public static void Main()
        {
            _display = new Bitmap(Bitmap.MaxWidth, Bitmap.MaxHeight);

            _azmdrawing = new AZMDrawing();
            _point = new AGENT.AZMutil.Point();

            screenWidth = _display.Width;
            screenHeight = _display.Height;

            screenCenterX = screenWidth / 2;
            screenCenterY = screenHeight / 2;

            squareCornerX = screenCenterX - (WIDTH_SQUARE / 2);
            squareCornerY = screenHeight - (HEIGHT_SQUARE + MARGIN_SQUARE_EDGE);

            currentTime = new DateTime();
            currentTime = DateTime.Now;

            displayMode = DISPLAY_MODE_BLACK;
            SetDisplayMode();

            showDigital = false;

            UpdateTime(null);

            dueTime = new TimeSpan(0, 0, 0, 0, 1000 - currentTime.Millisecond);
            period = new TimeSpan(0, 0, 0, 0, MILLISECOND_UPDATE);

            _updateClockTimer = new Timer(UpdateTime, null, dueTime, period);

            ButtonHelper.ButtonSetup = new Buttons[]
            {
                Buttons.BottomRight, Buttons.MiddleRight, Buttons.TopRight
            };

            ButtonHelper.Current.OnButtonPress += Current_OnButtonPress;

            Thread.Sleep(Timeout.Infinite);
        }
コード例 #20
0
ファイル: CuckooClock.cs プロジェクト: Tamegoro/AGENT
        public static void Main()
        {
            _display = new Bitmap(Bitmap.MaxWidth, Bitmap.MaxHeight);

            _cuckooFrames = new Bitmap(Resources.GetBytes(Resources.BinaryResources.CuckooFrame), Bitmap.BitmapImageType.Gif);

            currentTime = new DateTime();

            colorForeground = new Color();
            colorBackground = new Color();

            _azmdrawing = new AZMDrawing();
            _point = new AGENT.AZMutil.Point();

            screenWidth = _display.Width;
            screenHeight = _display.Height;

            screenCenterX = screenWidth / 2;
            screenCenterY = screenHeight / 2;

            diskCenterX = screenCenterX;
            diskRadius = (screenHeight - (MARGIN_CUCKOO_TOP + CUCKOO_HEIGHT + MARGIN_CUCKOO_BOTTOM + MARGIN_DISK_BOTTOM)) / 2;
            diskCenterY = screenHeight - MARGIN_DISK_BOTTOM - diskRadius - 1;

            displayMode = DISPLAY_MODE_WHITE_POINT;
            handType = HAND_TYPE_POINT;
            colorForeground = Color.Black;
            colorBackground = Color.White;

            cuckooFrame = 0;
            DrawWatchfaceBase();

            currentTime = DateTime.Now;

            if (currentTime.Hour % 12 != 0)
            {
                newH = currentTime.Hour % 12;
            }
            else
            {
                newH = 12;
            }

            oldH = newH;

            UpdateTime(null);

            currentTime = DateTime.Now;

            dueTime = new TimeSpan(0, 0, 0, 59 - currentTime.Second, 1000 - currentTime.Millisecond);
            period = new TimeSpan(0, 0, 1, 0, 0);

            dueTimeCuckoo = new TimeSpan(0, 0, 0, 0, 0);
            periodCuckoo = new TimeSpan(0, 0, 0, 0, 150);

            _updateClockTimer = new Timer(UpdateTime, null, dueTime, period);

            ButtonHelper.ButtonSetup = new Buttons[]
            {
                Buttons.BottomRight, Buttons.MiddleRight, Buttons.TopRight
            };

            ButtonHelper.Current.OnButtonPress += Current_OnButtonPress;

            Thread.Sleep(Timeout.Infinite);
        }
コード例 #21
0
        public static void Main()
        {
            _display = new Bitmap(Bitmap.MaxWidth, Bitmap.MaxHeight);

            _azmdrawing = new AZMDrawing();

            screenWidth = _display.Width;
            screenHeight = _display.Height;

            displayMode = DISPLAY_MODE_BLACK;
            SetDisplayMode();

            //showAnimation = false;
            showDigital = false;

            currentTime = new DateTime();
            currentTime = DateTime.Now;

            dueTime = new TimeSpan(0, 0, 0, 59 - currentTime.Second, 1000 - currentTime.Millisecond);
            period = new TimeSpan(0, 0, 1, 0, 0);

            dueTimeDigital = new TimeSpan(0, 0, 0, 0, 1000 - currentTime.Millisecond);
            periodDigital = new TimeSpan(0, 0, 0, 1, 0);

            dueTimeAnimation = new TimeSpan(0, 0, 0, 0, 0);
            periodAnimation = new TimeSpan(0, 0, 0, 0, ANIMATION_INTERVAL);

            _random = new Random(currentTime.Millisecond);

            fluctuation = _random.Next(MAX_FLUCTUATION * 2);
            fluctuation = fluctuation - MAX_FLUCTUATION;

            buttonFlag = false;

            oldMessageNumber = 0;
            UpdateTime(null);

            _updateClockTimer = new Timer(UpdateTime, null, dueTime, period);

            ButtonHelper.ButtonSetup = new Buttons[]
            {
                Buttons.BottomRight, Buttons.MiddleRight, Buttons.TopRight
            };

            ButtonHelper.Current.OnButtonPress += Current_OnButtonPress;

            Thread.Sleep(Timeout.Infinite);
        }
コード例 #22
0
ファイル: TinCanTelephone.cs プロジェクト: Tamegoro/AGENT
        public static void Main()
        {
            _display = new Bitmap(Bitmap.MaxWidth, Bitmap.MaxHeight);

            _azmdrawing = new AZMDrawing();

            colorForeground = new Color();
            colorBackground = new Color();

            _bmpAsk = new Bitmap(Resources.GetBytes(Resources.BinaryResources.TinCanTelephone01), Bitmap.BitmapImageType.Gif);
            _bmpAnswer = new Bitmap(Resources.GetBytes(Resources.BinaryResources.TinCanTelephone02), Bitmap.BitmapImageType.Gif);
            _bmpBalloon = new Bitmap(Resources.GetBytes(Resources.BinaryResources.TinCanTelephone03), Bitmap.BitmapImageType.Gif);

            screenWidth = _display.Width;
            screenHeight = _display.Height;

            //screenCenterX = screenWidth / 2;
            //screenCenterY = screenHeight / 2;

            balloonWidth = _bmpBalloon.Width;
            balloonHeight = _bmpBalloon.Height;

            tctWidth = _bmpAsk.Width;
            tctHeight = _bmpAsk.Height;

            displayMode = DISPLAY_MODE_BLACK_ENG;
            SetDisplayMode();

            asking = true;

            showDigital = false;

            currentTime = new DateTime();

            _random = new Random(currentTime.Millisecond);

            asking = true;
            lang = LANG_ENG;

            //UpdateTime(null);

            dueTime = new TimeSpan(0, 0, 0, 0, 1000 - currentTime.Millisecond);
            period = new TimeSpan(0, 0, 0, 0, INTERVAL_MILLISECOND);

            dueTimeDigital = new TimeSpan(0, 0, 0, 0, 1000 - currentTime.Millisecond);
            periodDigital = new TimeSpan(0, 0, 0, 1, 0);

            _updateClockTimer = new Timer(UpdateTime, null, dueTime, period);

            ButtonHelper.ButtonSetup = new Buttons[]
            {
                Buttons.BottomRight, Buttons.MiddleRight, Buttons.TopRight
            };

            ButtonHelper.Current.OnButtonPress += Current_OnButtonPress;

            Thread.Sleep(Timeout.Infinite);
        }
コード例 #23
0
ファイル: SG-1.cs プロジェクト: Tamegoro/AGENT
        public static void Main()
        {
            _display = new Bitmap(Bitmap.MaxWidth, Bitmap.MaxHeight);

            _innerRing = new Bitmap(Resources.GetBytes(Resources.BinaryResources.InnerRing), Bitmap.BitmapImageType.Gif);
            _iris = new Bitmap(Resources.GetBytes(Resources.BinaryResources.Iris), Bitmap.BitmapImageType.Gif);

            _azmdrawing = new AZMDrawing();
            _point = new AGENT.AZMutil.Point();

            screenWidth = _display.Width;
            screenHeight = _display.Height;

            screenCenterX = screenWidth / 2;
            screenCenterY = screenHeight / 2;

            gateRingWidth = _innerRing.Width;
            gateRingHeight = _innerRing.Height;

            irisWidth = _iris.Width;
            irisHeight = _iris.Height;

            irisCenterX = irisWidth / 2;
            irisCenterY = irisHeight / 2;

            _bmpwork = new Bitmap(irisWidth, irisHeight);

            colorForeground = Color.White;
            colorBackground = Color.Black;

            showDigital = false;
            showAnimation = false;

            degreeGateRing = 0;
            roundDirection = ROUND_RIGHT;

            closeIris = false;

            incomingWormhole = false;

            currentTime = new DateTime();
            currentTime = DateTime.Now;

            oldH = currentTime.Hour;

            UpdateTime(null);

            dueTime = new TimeSpan(0, 0, 0, 59 - currentTime.Second, 1000 - currentTime.Millisecond);
            period = new TimeSpan(0, 0, 1, 0, 0);

            dueTimeDigital = new TimeSpan(0, 0, 0, 0, 1000 - currentTime.Millisecond);
            periodDigital = new TimeSpan(0, 0, 0, 1, 0);

            dueTimeDial = new TimeSpan(0, 0, 0, 0, 0);
            periodDial = new TimeSpan(0, 0, 0, 0, DIAL_INTERVAL);

            dueTimeIris = new TimeSpan(0, 0, 0, 0, 0);
            periodIris = new TimeSpan(0, 0, 0, 0, IRIS_INTERVAL);

            _updateClockTimer = new Timer(UpdateTime, null, dueTime, period);

            ButtonHelper.ButtonSetup = new Buttons[]
            {
                Buttons.BottomRight, Buttons.MiddleRight, Buttons.TopRight
            };

            ButtonHelper.Current.OnButtonPress += Current_OnButtonPress;

            Thread.Sleep(Timeout.Infinite);
        }
コード例 #24
0
        public static void Main()
        {

            _display = new Bitmap(Bitmap.MaxWidth, Bitmap.MaxHeight);

            currentTime = new DateTime();

            colorForeground = new Color();
            colorBackground = new Color();

            _azmdrawing = new AZMDrawing();

            screenWidth = _display.Width;
            screenHeight = _display.Height;

            screenCenterX = screenWidth / 2;
            screenCenterY = screenHeight / 2;

            fontWidth = fontIPAGothicFixedNumberSymbol16.CharWidth('0');
            fontHeight = fontIPAGothicFixedNumberSymbol16.Height;


            questionX = ((screenWidth - ((fontWidth * 6) + fontHeight)) / 2) + 1;
            questionYH = MARGIN_Y;
            questionYM = MARGIN_Y + fontHeight + ((screenHeight - ((MARGIN_Y * 2) + (fontHeight * 3))) / 2);
            questionYS = MARGIN_Y + (fontHeight * 2) + (screenHeight - ((MARGIN_Y * 2) + (fontHeight * 3)));

            answerX = (questionX * 2) + (fontWidth * 6);
            answerY = MARGIN_Y + (fontWidth * 4);

            displayMode = DISPLAY_MODE_BLACK;
            colorForeground = Color.White;
            colorBackground = Color.Black;

            oldH = -1;
            oldM = -1;

            showAnswer = false;
            //showAnswer = true;

            currentTime = DateTime.Now;

            rnd = new Random(currentTime.Millisecond);

            UpdateTime(null);

            currentTime = DateTime.Now;

            dueTime = new TimeSpan(0, 0, 0, 0, 1000 - currentTime.Millisecond);
            period = new TimeSpan(0, 0, 0, 1, 0);

            _updateClockTimer = new Timer(UpdateTime, null, dueTime, period);

            ButtonHelper.ButtonSetup = new Buttons[]
            {
                Buttons.BottomRight, Buttons.MiddleRight, Buttons.TopRight
            };

            ButtonHelper.Current.OnButtonPress += Current_OnButtonPress;

            Thread.Sleep(Timeout.Infinite);

        }
コード例 #25
0
ファイル: TimeFlies.cs プロジェクト: Tamegoro/AGENT
        public static void Main()
        {
            _display = new Bitmap(Bitmap.MaxWidth, Bitmap.MaxHeight);

            _azmdrawing = new AZMDrawing();
            _point = new AGENT.AZMutil.Point();

            screenWidth = _display.Width;
            screenHeight = _display.Height;

            screenCenterX = screenWidth / 2;
            screenCenterY = screenHeight / 2;

            displayMode = DISPLAY_MODE_BLACK_SQUHAND_NOMAL;
            handType = HAND_TYPE_SQUARE;
            speedRate = SPEED_NOMAL;
            colorForeground = Color.White;
            colorBackground = Color.Black;

            showDigital = false;

            currentTime = new DateTime();
            currentTime = DateTime.Now;

            UpdateTime(null);

            currentTime = DateTime.Now;

            dueTime = new TimeSpan(0, 0, 0, 0, 0);

            periodNomal = new TimeSpan(0, 0, 0, 1, 0);
            periodOnePointFive = new TimeSpan(0, 0, 0, 0, 1000 / 3 * 2);
            periodDouble = new TimeSpan(0, 0, 0, 0, 1000 / 2);

            dueTimeDigital = new TimeSpan(0, 0, 0, 0, 1000 - currentTime.Millisecond);
            periodDigital = new TimeSpan(0, 0, 0, 1, 0);

            _updateClockTimer = new Timer(UpdateTime, null, dueTime, periodNomal);

            ButtonHelper.ButtonSetup = new Buttons[]
            {
                Buttons.BottomRight, Buttons.MiddleRight, Buttons.TopRight
            };

            ButtonHelper.Current.OnButtonPress += Current_OnButtonPress;

            Thread.Sleep(Timeout.Infinite);
        }
コード例 #26
0
ファイル: Tachometer.cs プロジェクト: Tamegoro/AGENT
        public static void Main()
        {
            _display = new Bitmap(Bitmap.MaxWidth, Bitmap.MaxHeight);

            _azmdrawing = new AZMDrawing();
            _point = new AGENT.AZMutil.Point();

            colorForeground = new Color();
            colorBackground = new Color();

            screenWidth = _display.Width;
            screenHeight = _display.Height;

            screenCenterX = screenWidth / 2;
            screenCenterY = screenHeight / 2;

            //distanceDial = screenCenterX - (MARGIN_CIRCLE_EDGE + MARGIN_RED_ZONE_OUTER_CIRCLE + MARGIN_DIAL_INNER_CIRCLE);
            //distanceNumber = distanceDial-(LENGTH_DIAL_LONG + MARGIN_HOUR_NUMBER_DIAL);

            displayMode = DISPLAY_MODE_BLACK_KMH;
            SetDisplayMode(displayMode);

            showDigital = false;

            currentTime = new DateTime();

            UpdateTime(null);

            dueTime = new TimeSpan(0, 0, 0, 59 - currentTime.Second, 1000 - currentTime.Millisecond);
            period = new TimeSpan(0, 0, 1, 0, 0);

            dueTimeDigital = new TimeSpan(0, 0, 0, 0, 1000 - currentTime.Millisecond);
            periodDigital = new TimeSpan(0, 0, 0, 1, 0);

            _updateClockTimer = new Timer(UpdateTime, null, dueTime, period);

            ButtonHelper.ButtonSetup = new Buttons[]
            {
                Buttons.BottomRight, Buttons.MiddleRight, Buttons.TopRight
            };

            ButtonHelper.Current.OnButtonPress += Current_OnButtonPress;

            Thread.Sleep(Timeout.Infinite);
        }
コード例 #27
0
ファイル: JapaneseDontHurry.cs プロジェクト: Tamegoro/AGENT
        public static void Main()
        {
            _display = new Bitmap(Bitmap.MaxWidth, Bitmap.MaxHeight);

            fontDay = fontYasashisaGothicBoldDayOfWeek10;

            _azmdrawing = new AZMDrawing();
            _point = new AGENT.AZMutil.Point();

            screenWidth = _display.Width;
            screenHeight = _display.Height;

            screenCenterX = screenWidth / 2;
            screenCenterY = screenHeight / 2;

            displayMode = DISPLAY_MODE_WHITE_POIHAND_DISK;
            handType = HAND_TYPE_POINT;
            showDate = false;
            colorForeground = Color.Black;
            colorBackground = Color.Black;
            colorDisk = Color.White;

            showDigital = false;

            currentTime = new DateTime();
            currentTime = DateTime.Now;

            UpdateTime(null);

            currentTime = DateTime.Now;

            dueTime = new TimeSpan(0, 0, 0, 59 - currentTime.Second, 1000 - currentTime.Millisecond);
            period = new TimeSpan(0, 0, 1, 0, 0);

            dueTimeDigital = new TimeSpan(0, 0, 0, 0, 1000 - currentTime.Millisecond);
            periodDigital = new TimeSpan(0, 0, 0, 1, 0);

            _updateClockTimer = new Timer(UpdateTime, null, dueTime, period);

            ButtonHelper.ButtonSetup = new Buttons[]
            {
                Buttons.BottomRight, Buttons.MiddleRight, Buttons.TopRight
            };

            ButtonHelper.Current.OnButtonPress += Current_OnButtonPress;

            Thread.Sleep(Timeout.Infinite);
        }