Пример #1
0
        //=========================================================================================
        //
        //=========================================================================================
        /// <summary></summary>
        /// <param name="p_mainBox"></param>
        /// <param name="p_authSet"></param>
        /// <param name="p_isFile"></param>
        /// <param name="p_title"></param>
        public AuthListDialog(MainBox p_mainBox, DataSet p_authSet, bool p_isFile, string p_title)
        {
            this.m_isFile  = p_isFile;
            this.m_mainBox = p_mainBox;
            this.m_authSet = p_authSet.Copy();

            this.InitializeComponent();

            AppMediator.SINGLETON.ResourceHelper.TranslateText(this, this.components);

            this.InitializeAuthList();

            this.Text = p_title;

            if (p_isFile == true)
            {
                this.cbSub.Visible    = false;
                this.cbAllSub.Visible = false;
            }
            else
            {
                this.cbSub.Visible    = true;
                this.cbAllSub.Visible = true;
            }
        }
Пример #2
0
        //=========================================================================================
        //
        //=========================================================================================
        /// <summary></summary>
        /// <param name="p_mainBox"></param>
        public UploadDialog(MainBox p_mainBox)
        {
            g_upHelper.MainBox = p_mainBox;
            this.InitializeComponent();

            AppMediator.SINGLETON.ResourceHelper.TranslateText(this, this.components);
        }
Пример #3
0
        /// <summary>
        /// Resets layout of the widget
        /// </summary>
        protected void ResetLayout()
        {
            if (ResolveColorNames == false)
            {
                name.Text = colorName;
            }
            else
            {
                name.Text = ColorNames.GetName(Color);
            }
            if (SmallFonts == true)
            {
                name.Text = "<small>" + name.Text + "</small>";
            }
            double w, h;

            colorbox.Visible = true;
            name.Visible     = (NameVisible == true);
            MainBox.GetSize(out w, out h);
            if (Allocation.Width < w)
            {
                WidthRequest = System.Convert.ToInt32(w);
            }
            if (Allocation.Height < h)
            {
                HeightRequest = System.Convert.ToInt32(h);
            }
            CellsChanged();
        }
Пример #4
0
    void MissionBoard()
    {
        GameObject MainBox;

        MainBox = GameObject.Find("HighlightedBox");
        MainBox.GetComponent <Text>().text = "Hello";
    }
Пример #5
0
 private void P5Create_Click(object sender, EventArgs e)
 {
     MainBox.AppendText("PCB 5 Created !\n");
     P5Signal.BackColor = System.Drawing.Color.Yellow;
     System.Threading.Thread.Sleep(300);
     P5Ready_Click(sender, e);
 }
 public MappedCellRendererTime()
     : base(new DrawingCellHBox())
 {
     showAMPMDesignator = (System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.LongTimePattern.IndexOf("tt") > -1);
     timetext.SizeText  = ResetCellSize();
     MainBox.PackEnd(new DrawingCellNull(), true);
     MainBox.PackEnd(timetext, false);
 }
 public override void Initialize()
 {
     base.Initialize();
     toolbar = new HeaderBox();
     toolbar.GradientBackground = true;
     toolbar.SetMargins(0, 1, 0, 0);
     MainBox.PackStart(toolbar, false, false, 0);
     ((Gtk.Box.BoxChild)MainBox [toolbar]).Position = 0;
 }
        private void k_Click(object sender, RoutedEventArgs e)
        {
            MainBox.Clear();

            foreach (var I in Database.StudentsReturn("SELECT * FROM Names ORDER BY AverageScore"))
            {
                MainBox.AppendText($"{I}\n");
            }
        }
Пример #9
0
        //=========================================================================================
        //
        //=========================================================================================
        /// <summary></summary>
        /// <param name="p_mainBox"></param>
        /// <param name="p_context"></param>
        /// <param name="p_target"></param>
        /// <param name="p_source"></param>
        public MoveDialog(MainBox p_mainBox, bool p_context, TreeNode p_target, TreeNode p_source)
        {
            this.m_targetNode = p_context == true ? p_target : p_mainBox.g_mainHelper.dropNode;
            this.m_sourceNode = p_context == true ? p_source : p_mainBox.g_mainHelper.dragNode;

            this.InitializeComponent();

            AppMediator.SINGLETON.ResourceHelper.TranslateText(this, this.components);
        }
        private void ShowAll(object sender, RoutedEventArgs e)
        {
            MainBox.Clear();


            foreach (var I in Database.StudentsReturn("SELECT * FROM Names"))
            {
                MainBox.AppendText($"{I}\n");
            }
        }
        public MappedCellRendererCurrency()
            : base(new DrawingCellHBox())
        {
            System.Console.WriteLine("Created");
            MainBox.PackEnd(new DrawingCellNull(), true);
            MainBox.PackEnd(currencytext, false);
            string s = " " + System.Threading.Thread.CurrentThread.CurrentCulture.NumberFormat.CurrencySymbol;

            currencysymbol = new DrawingCellEditText(s, s);
            MainBox.PackEnd(currencysymbol, false);
            currencysymbol.Visible = false;
        }
Пример #12
0
 private void P5Run_Click(object sender, EventArgs e)
 {
     MainBox.AppendText("PCB 5 is Running !\n");
     P5Signal.BackColor = System.Drawing.Color.Green;
     if (Run.IsEmpty())
     {
         Run.Push(5);
     }
     else
     {
         RunToBlock(sender, e);
         Run.Push(5);
     }
 }
Пример #13
0
        public Form1()
        {
            InitializeComponent();
            surface = new Bitmap(MainBox.Size.Width, MainBox.Size.Height);
            surfg   = Graphics.FromImage(surface);
            Init();
            this.DoubleBuffered = true;
            Timer timer = new Timer();

            timer.Tick    += Timer_Counter;
            timer.Interval = 1000;
            timer.Enabled  = true;
            timeController = new Looper(GameLoop);
            g = MainBox.CreateGraphics();
        }
Пример #14
0
 void vm_OnScroll(object sender, bool isScrollUp)
 {
     if (isScrollUp)
     {
         MainBox.ScrollToTop();
         ScrollUpButton.Visibility   = Visibility.Collapsed;
         ScrollDownButton.Visibility = Visibility.Visible;
     }
     else
     {
         MainBox.ScrollToBottom();
         ScrollUpButton.Visibility   = Visibility.Visible;
         ScrollDownButton.Visibility = Visibility.Collapsed;
     }
 }
Пример #15
0
 //RunArea
 private void P1Run_Click(object sender, EventArgs e)
 {
     MainBox.AppendText("PCB 1 is Running !\n");
     P1Signal.BackColor = System.Drawing.Color.Green;
     //timer1.Start();
     //mainTimer.Start();
     if (Run.IsEmpty())
     {
         Run.Push(1);
     }
     else
     {
         RunToBlock(sender, e);
         Run.Push(1);
     }
 }
Пример #16
0
        /// <summary>
        /// Resets layout of the widget
        /// </summary>
        protected void ResetLayout()
        {
            double w, h;

            icon.Visible = (IconVisible == true) && (Pixbuf != null);
            MainBox.GetSize(out w, out h);
            if (Allocation.Width < w)
            {
                WidthRequest = System.Convert.ToInt32(w);
            }
            if (Allocation.Height < h)
            {
                HeightRequest = System.Convert.ToInt32(h);
            }
            CellsChanged();
        }
Пример #17
0
        public MappedCellRendererDate()
            : base(new DrawingCellHBox())
        {
            this.Mode         = CellRendererMode.Editable;
            datetext.SizeText = "88/88/8888";
            MainBox.PackEnd(new DrawingCellNull(), true);
            MainBox.PackEnd(datetext, false);
            DateEntry de = new DateEntry();

            de.IsCellRenderer = true;
            de.HasCalculator  = false;
            de.HasClearButton = false;
            de.HasDropDown    = false;

            adapter = new CellEditableAdapter(de);
        }
Пример #18
0
        /// <summary>
        /// Resolves size of cell renderer
        /// </summary>
        /// <param name="widget">
        /// Widget <see cref="Widget"/>
        /// </param>
        /// <param name="cell_area">
        /// Area <see cref="Gdk.Rectangle"/>
        /// </param>
        /// <param name="x_offset">
        /// X offset <see cref="System.Int32"/>
        /// </param>
        /// <param name="y_offset">
        /// Y offset <see cref="System.Int32"/>
        /// </param>
        /// <param name="width">
        /// Width <see cref="System.Int32"/>
        /// </param>
        /// <param name="height">
        /// Height <see cref="System.Int32"/>
        /// </param>
        public override void GetSize(Widget widget, ref Gdk.Rectangle cell_area, out int x_offset, out int y_offset, out int width, out int height)
        {
            x_offset = 0;
            y_offset = 0;
            double w, h = 0;

            masterWidget = widget;
            MainBox.Arguments.Start(CellAction.GetSize, new CellExposeEventArgs(null, null, widget.GdkWindow, null, null));
            MainBox.Arguments.PassedArguments.Widget   = MasterWidget;
            MainBox.Arguments.PassedArguments.Renderer = this;
            MainBox.GetCellSize(out w, out h);
            MainBox.Arguments.Stop();
            masterWidget = null;
            width        = System.Convert.ToInt32(w + (Padding * 2)) + 4;
            height       = System.Convert.ToInt32(h + (Padding * 2));
        }
Пример #19
0
 private void P5Exit_Click(object sender, EventArgs e)
 {
     MainBox.AppendText("PCB 5 Exited !\n");
     P5Signal.BackColor = System.Drawing.Color.White;
     //Bar1.Value = 0;
     if (Run.Gettop() == 5)
     {
         Run.Pop();
         if (!Block.IsEmpty())
         {
             Run.Push(Block.Pop());
             ExitToLight(sender, e);
         }
     }
     Ready.Pop(5);
 }
Пример #20
0
        public void OnShow(object o)
        {
            var item = o as RoomSubCategory.Time;

            if (item == null)
            {
                return;
            }

            //var vm = this.DataContext as RoomViewModel;
            //if (vm != null)
            //    vm.LoadHall(item);

            MainBox.ScrollToBottom();
            ScrollUpButton.Visibility   = Visibility.Visible;
            ScrollDownButton.Visibility = Visibility.Collapsed;
        }
Пример #21
0
        private void RunToBlock(object sender, EventArgs e)
        {
            switch (Run.Gettop())
            {
            case 1: Run.Pop(); MainBox.AppendText("PCB 1 goto Block !\n"); P1Block_Click(sender, e); break;

            case 2: Run.Pop(); MainBox.AppendText("PCB 2 goto Block !\n"); P2Block_Click(sender, e); break;

            case 3: Run.Pop(); MainBox.AppendText("PCB 3 goto Block !\n"); P3Block_Click(sender, e); break;

            case 4: Run.Pop(); MainBox.AppendText("PCB 4 goto Block !\n"); P4Block_Click(sender, e); break;

            case 5: Run.Pop(); MainBox.AppendText("PCB 5 goto Block !\n"); P5Block_Click(sender, e); break;

            default: Console.WriteLine("用户这辈子都看不到这句话!"); break;
            }
        }
Пример #22
0
        public LinkLabel()
        {
            HandlesPrelight = true;
            GtkResources.RegisterDefaultResourceHandler();
            icon.StateResolving = ValueResolveMethod.FromOwner;
            Spacing             = 2;
            MainBox.PackEnd(icon, false);
            MainBox.PackEnd(link, true);

            this.Realized += delegate(object sender, EventArgs e) {
                GdkWindow.Cursor = new Gdk.Cursor(Gdk.CursorType.Hand1);
            };

            Gtk.Drag.SourceSet(this, Gdk.ModifierType.Button1Mask, ValidTargets, DragAction.Copy);
            DragBegin   += HandleDragBegin;
            DragDataGet += HandleDragDataGet;
        }
Пример #23
0
        public void ToLight(object sender, EventArgs e, int i)
        {
            switch (i)
            {
            case 1: P1Signal.BackColor = System.Drawing.Color.Green; MainBox.AppendText("PCB 1  is running !\n"); break;

            case 2: P2Signal.BackColor = System.Drawing.Color.Green; MainBox.AppendText("PCB 2  is running !\n"); break;

            case 3: P3Signal.BackColor = System.Drawing.Color.Green; MainBox.AppendText("PCB 3  is running !\n"); break;

            case 4: P4Signal.BackColor = System.Drawing.Color.Green; MainBox.AppendText("PCB 4  is running !\n"); break;

            case 5: P5Signal.BackColor = System.Drawing.Color.Green; MainBox.AppendText("PCB 5  is running !\n"); break;

            default: Console.WriteLine("用户这辈子都看不到这句话!"); break;
            }
        }
Пример #24
0
        private void ExitToLight(object sender, EventArgs e)
        {
            switch (Run.Gettop())
            {
            case 1:  MainBox.AppendText("PCB 1 goto Running !\n"); P1Signal.BackColor = System.Drawing.Color.Green; break;

            case 2:  MainBox.AppendText("PCB 2 goto Running !\n"); P2Signal.BackColor = System.Drawing.Color.Green; break;

            case 3:  MainBox.AppendText("PCB 3 goto Running !\n"); P3Signal.BackColor = System.Drawing.Color.Green; break;

            case 4:  MainBox.AppendText("PCB 4 goto Running !\n"); P4Signal.BackColor = System.Drawing.Color.Green; break;

            case 5:  MainBox.AppendText("PCB 5 goto Running !\n"); P5Signal.BackColor = System.Drawing.Color.Green; break;

            default: Console.WriteLine("用户这辈子都看不到这句话!"); break;
            }
        }
Пример #25
0
        /// <summary></summary>
        /// <param name="p_mainBox"></param>
        /// <param name="p_beforeFSize"></param>
        /// <param name="p_beforeWDate"></param>
        /// <param name="p_afterFName"></param>
        /// <param name="p_afterFSize"></param>
        /// <param name="p_afterWDate"></param>
        public ConfirmDialog(MainBox p_mainBox, string p_beforeFSize, string p_beforeWDate, string p_afterFName, string p_afterFSize, string p_afterWDate)
        {
            this.m_mainBox = p_mainBox;
            this.InitializeComponent();

            AppMediator.SINGLETON.ResourceHelper.TranslateText(this, this.components);

            double beforeFSize = Convert.ToInt64(p_beforeFSize);

            this.lbBeforeFileSize.Text      = beforeFSize.ToString("n0") + AppMediator.SINGLETON.ResourceHelper.TranslateWord("바이트");
            this.lbBeforeFileWriteDate.Text = Convert.ToDateTime(p_beforeWDate).ToString("yyyy년 MM월 dd일 dddd, HH:mm:dd") + " " + AppMediator.SINGLETON.ResourceHelper.TranslateWord("수정됨");

            double afterFSize = Convert.ToInt64(p_afterFSize);

            this.lbAfterFileSize.Text      = afterFSize.ToString("n0") + AppMediator.SINGLETON.ResourceHelper.TranslateWord("바이트");
            this.lbAfterFileWriteDate.Text = Convert.ToDateTime(p_afterWDate).ToString("yyyy년 MM월 dd일 dddd, HH:mm:dd") + " " + AppMediator.SINGLETON.ResourceHelper.TranslateWord("수정됨");

            this.lbTitle.Text = AppMediator.SINGLETON.ResourceHelper.TranslateWord("이 폴더에 이미") + " '" + p_afterFName + "' " + AppMediator.SINGLETON.ResourceHelper.TranslateWord("파일이 있습니다.");
        }
        public override void Initialize()
        {
            base.Initialize();

            var image = Xwt.Drawing.Image.FromResource(typeof(MacPlatformService).Assembly, "maintoolbarbg.png");

            Window.Realized += delegate {
                NSWindow w = GtkQuartz.GetWindow(Window);
                w.IsOpaque        = false;
                w.BackgroundColor = NSColor.FromPatternImage(image.ToBitmap().ToNSImage());
                w.StyleMask      |= NSWindowStyle.TexturedBackground;
            };

            toolbar                = new CustomToolbar();
            toolbar.Background     = (Gdk.Pixbuf)Xwt.Toolkit.Load(Xwt.ToolkitType.Gtk).GetNativeImage(image);
            toolbar.TitleBarHeight = MacPlatformService.GetTitleBarHeight();
            MainBox.PackStart(toolbar, false, false, 0);
            ((Gtk.Box.BoxChild)MainBox [toolbar]).Position = 0;
        }
Пример #27
0
        public override void Initialize()
        {
            base.Initialize();

            var resource = "maintoolbarbg.png";

            Window.Realized += delegate {
                NSWindow w = GtkQuartz.GetWindow(Window);
                w.IsOpaque = false;
                NSImage img = MacPlatformService.LoadImage(resource);
                w.BackgroundColor = NSColor.FromPatternImage(img);
                w.StyleMask      |= NSWindowStyle.TexturedBackground;
            };

            toolbar                = new CustomToolbar();
            toolbar.Background     = MonoDevelop.Components.CairoExtensions.LoadImage(typeof(MacPlatformService).Assembly, resource);
            toolbar.TitleBarHeight = MacPlatformService.GetTitleBarHeight();
            MainBox.PackStart(toolbar, false, false, 0);
            ((Gtk.Box.BoxChild)MainBox [toolbar]).Position = 0;
        }
Пример #28
0
 public MappedCellRendererIp()
     : base(new DrawingCellHBox())
 {
     for (int i = 0; i < 4; i++)
     {
         labels[i].SizeText = "888";
     }
     MainBox.PackEnd(new DrawingCellNull(), true);
     for (int i = 0; i < 4; i++)
     {
         labels[i].XPos = 0.5;
     }
     MainBox.PackEnd(labels[0], false);
     MainBox.PackEnd(new DrawingCellEditText("."), false);
     MainBox.PackEnd(labels[1], false);
     MainBox.PackEnd(new DrawingCellEditText("."), false);
     MainBox.PackEnd(labels[2], false);
     MainBox.PackEnd(new DrawingCellEditText("."), false);
     MainBox.PackEnd(labels[3], false);
 }
Пример #29
0
        private void P5Block_Click(object sender, EventArgs e)
        {
            MainBox.AppendText("PCB 5 is Blocking !\n");
            P5Signal.BackColor = System.Drawing.Color.Red;

            if (Run.Gettop() == 5)
            {
                Console.WriteLine("Run的栈顶是" + Run.Gettop());
                Console.WriteLine("Block的栈顶是" + Block.Gettop());
                Run.Pop();
                Run.Push(Block.Gettop());
                Console.WriteLine("RunPush之后的站顶是" + Run.Gettop());
                ToLight(sender, e, Run.Gettop());
                Block.Pop();
                Block.Push(5);
                Console.WriteLine("Block的栈顶是" + Block.Gettop());
            }
            else
            {
                Block.Push(5);
            }
        }
Пример #30
0
        public ColorLabel()
        {
            colorbox.BorderVisible = true;
            colorbox.BorderWidth   = 2;
            colorbox.BorderColor   = new Cairo.Color(0, 0, 0);
            colorbox.FillVisible   = true;
            colorbox.FillColor     = Color;
            HandlesPrelight        = true;
            GtkResources.RegisterDefaultResourceHandler();
//			icon.StateResolving = ValueResolveMethod.FromOwner;
            Spacing = 4;
            MainBox.PackEnd(colorbox, false);
            MainBox.PackEnd(name, true);

            this.Realized += delegate(object sender, EventArgs e) {
                GdkWindow.Cursor = new Gdk.Cursor(Gdk.CursorType.Hand1);
            };

            Gtk.Drag.SourceSet(this, Gdk.ModifierType.Button1Mask, ValidTargets, DragAction.Copy);
            DragBegin   += HandleDragBegin;
            DragDataGet += HandleDragDataGet;
        }