Beispiel #1
0
        public DispatchMain()
        {
            Icon = Icon.ExtractAssociatedIcon("icon.ico");
            InitializeComponent();

            SkinManager.AddFormToManage(this);
            SkinManager.Theme       = MaterialSkinManager.Themes.LIGHT;
            SkinManager.ColorScheme = new ColorScheme(Primary.DeepPurple500, Primary.DeepPurple700,
                                                      Primary.DeepPurple400, Accent.DeepPurple200, TextShade.WHITE);

            // Starting Timer
            var timer = new Timer();

            void Sync(object sender, EventArgs args)
            {
#pragma warning disable 4014 // Non-awaited task warning
                Resync(true);
#pragma warning restore 4014
            }

            timer.Tick += Sync;

            Sync(this, EventArgs.Empty);

            timer.Interval = 15000;
            timer.Start();
        }
Beispiel #2
0
        //Dark Theme
        public void InitializeSkin()
        {
            var skinManager = MaterialSkinManager.Instance;

            SkinManager.AddFormToManage(this);
            skinManager.Theme = MaterialSkinManager.Themes.LIGHT;
        }
Beispiel #3
0
        public Main()
        {
            InitializeComponent();

            skinmanager = SkinManager.Instance;
            SkinManager.AddFormToManage(this);
            SkinManager.Theme       = SkinManager.Themes.LIGHT;
            SkinManager.ColorScheme = new ColorScheme(Primary.BlackGrey3535, Primary.BlackGrey3535, Primary.BlueGrey500, Accent.Pink400, TextShade.WHITE);

            Left          = Top = 0;
            Width         = Screen.PrimaryScreen.Bounds.Width;
            Height        = Screen.PrimaryScreen.Bounds.Height - 40;
            Location      = new Point();
            StartPosition = FormStartPosition.Manual;

            Current.SoftwareType = Server.SOFTWARETYPE;



            IntiMainMenu();

            ShowLoginform();

            GetVersionInfo();
        }
Beispiel #4
0
 /// <summary>
 /// Constructer Setting up the Layout
 /// </summary>
 public HeadsUp()
 {
     SkinManager.AddFormToManage(this);
     TopMost           = true;
     ShowInTaskbar     = false;
     Width             = Convert.ToInt32(Screen.PrimaryScreen.Bounds.Width * 0.4);
     _AnimationManager = new AnimationManager();
     _AnimationManager.AnimationType        = AnimationType.EaseOut;
     _AnimationManager.Increment            = 0.03;
     _AnimationManager.OnAnimationProgress += _AnimationManager_OnAnimationProgress;
     TitelLabel                = new MaterialLabel();
     TitelLabel.AutoSize       = true;
     TextLabel                 = new MaterialLabel();
     ButtonPanel               = new FlowLayoutPanel();
     ButtonPanel.FlowDirection = FlowDirection.RightToLeft;
     ButtonPanel.Height        = 40;
     //ButtonPanel.AutoScroll = true;
     ButtonPanel.Dock = DockStyle.Bottom;
     //ButtonPanel.BackColor = BackColor;
     Controls.Add(ButtonPanel);
     TitelLabel.Location   = new Point(20, 10);
     TextLabel.Location    = new Point(20, TitelLabel.Bottom + 5);
     TextLabel.AutoSize    = true;
     TextLabel.Resize     += TextLabel_Resize;
     TextLabel.MaximumSize = new Size(Width, Convert.ToInt32(Screen.PrimaryScreen.Bounds.Height * 0.2));
     Controls.Add(TitelLabel);
     Controls.Add(TextLabel);
     Buttons = new ObservableCollection <MaterialFlatButton>();
     Buttons.CollectionChanged += Buttons_CollectionChanged;
 }
Beispiel #5
0
 public Add_Supplier()
 {
     InitializeComponent();
     skinManager = MaterialSkinManager.Instance;
     SkinManager.AddFormToManage(this);
     SkinManager.Theme       = MaterialSkin.MaterialSkinManager.Themes.LIGHT;
     SkinManager.ColorScheme = new MaterialSkin.ColorScheme(MaterialSkin.Primary.Blue800, MaterialSkin.Primary.Blue900, MaterialSkin.Primary.Blue900, MaterialSkin.Accent.Orange700, MaterialSkin.TextShade.WHITE);
 }
Beispiel #6
0
 public Form1()
 {
     InitializeComponent();
     skinManager = MaterialSkinManager.Instance;
     SkinManager.AddFormToManage(this);
     SkinManager.Theme       = MaterialSkinManager.Themes.DARK;
     SkinManager.ColorScheme = new ColorScheme(Primary.Green600, Primary.Green900, Primary.Green900, Accent.LightBlue200, TextShade.WHITE);
 }
Beispiel #7
0
 public Login()
 {
     InitializeComponent();
     MaterialSkin.MaterialSkinManager skinManage = MaterialSkin.MaterialSkinManager.Instance;
     SkinManager.AddFormToManage(this);
     skinManage.Theme        = MaterialSkin.MaterialSkinManager.Themes.LIGHT;
     SkinManager.ColorScheme = new MaterialSkin.ColorScheme(MaterialSkin.Primary.Red800, MaterialSkin.Primary.BlueGrey900, MaterialSkin.Primary.Blue500, MaterialSkin.Accent.Orange100, MaterialSkin.TextShade.WHITE);
 }
        public Form1()
        {
            InitializeComponent();
            var skinManager = MaterialSkinManager.Instance;

            SkinManager.AddFormToManage(this);
            SkinManager.Theme       = MaterialSkinManager.Themes.DARK;
            SkinManager.ColorScheme = new ColorScheme(Primary.BlueGrey800, Primary.BlueGrey900, Primary.BlueGrey500, Accent.LightBlue200, TextShade.BLACK);
        }
 public Add_User()
 {
     InitializeComponent();
     skinManager = MaterialSkinManager.Instance;
     SkinManager.AddFormToManage(this);
     SkinManager.Theme                 = MaterialSkin.MaterialSkinManager.Themes.LIGHT;
     SkinManager.ColorScheme           = new MaterialSkin.ColorScheme(MaterialSkin.Primary.Blue800, MaterialSkin.Primary.Blue900, MaterialSkin.Primary.Blue900, MaterialSkin.Accent.Orange700, MaterialSkin.TextShade.WHITE);
     cmbSecurityQuestion.SelectedIndex = 0;
     cmbUserLevel.SelectedIndex        = 0;
 }
 public Loyal_Card()
 {
     InitializeComponent();
     skinManager = MaterialSkinManager.Instance;
     SkinManager.AddFormToManage(this);
     SkinManager.Theme       = MaterialSkin.MaterialSkinManager.Themes.LIGHT;
     SkinManager.ColorScheme = new MaterialSkin.ColorScheme(MaterialSkin.Primary.Blue800, MaterialSkin.Primary.Blue900, MaterialSkin.Primary.Blue900, MaterialSkin.Accent.Orange700, MaterialSkin.TextShade.WHITE);
     showCustomerList();
     generateRandomNumbers();
 }
Beispiel #11
0
        public OfficerView(Officer data)
        {
            Icon = Icon.ExtractAssociatedIcon("icon.ico");

            InitializeComponent();

            SkinManager.AddFormToManage(this);
            ofc = data;
            new Action(async delegate { await SetAssignment(); })();
        }
Beispiel #12
0
        public CivView(Civilian civData)
        {
            Icon = Icon.ExtractAssociatedIcon("icon.ico");
            InitializeComponent();

            data = civData;

            SkinManager.AddFormToManage(this);
            UpdateCurrentInformation();
        }
Beispiel #13
0
 public Add_Item()
 {
     InitializeComponent();
     skinManager = MaterialSkinManager.Instance;
     SkinManager.AddFormToManage(this);
     SkinManager.Theme       = MaterialSkin.MaterialSkinManager.Themes.LIGHT;
     SkinManager.ColorScheme = new MaterialSkin.ColorScheme(MaterialSkin.Primary.Blue800, MaterialSkin.Primary.Blue900, MaterialSkin.Primary.Blue900, MaterialSkin.Accent.Orange700, MaterialSkin.TextShade.WHITE);
     getBrand();
     cmbBrand.SelectedIndex    = 0;
     cmbCategory.SelectedIndex = 0;
 }
 public Purchase_OrderList()
 {
     InitializeComponent();
     skinManager = MaterialSkinManager.Instance;
     SkinManager.AddFormToManage(this);
     SkinManager.Theme       = MaterialSkin.MaterialSkinManager.Themes.LIGHT;
     SkinManager.ColorScheme = new MaterialSkin.ColorScheme(MaterialSkin.Primary.Blue800, MaterialSkin.Primary.Blue900, MaterialSkin.Primary.Blue900, MaterialSkin.Accent.Orange700, MaterialSkin.TextShade.WHITE);
     showOrderList();
     getTotalPrice();
     getTotalItem();
     getPurchaseNo();
 }
Beispiel #15
0
        public Accept911(Civilian requester, EmergencyCall call)
        {
            Icon = Icon.ExtractAssociatedIcon("icon.ico");
            InitializeComponent();

            civ       = requester;
            this.call = call;

            SkinManager.AddFormToManage(this);

            information.Text = $"Incoming call from {requester.First} {requester.Last} for an UNKNOWN reason...";
            SetForegroundWindow(Handle);
        }
Beispiel #16
0
        public Login()
        {
            InitializeComponent();
            var skinManager = MaterialSkin.MaterialSkinManager.Instance;

            SkinManager.AddFormToManage(this);
            SkinManager.Theme       = MaterialSkin.MaterialSkinManager.Themes.DARK;
            SkinManager.ColorScheme = new MaterialSkin.ColorScheme
                                          (MaterialSkin.Primary.Orange600, MaterialSkin.Primary.Orange800, MaterialSkin.Primary.Orange900,
                                          MaterialSkin.Accent.Orange100,
                                          MaterialSkin.TextShade.WHITE

                                          );
        }
        public AddExistingAssignment(Officer ofc)
        {
            Icon = Icon.ExtractAssociatedIcon("icon.ico");
            InitializeComponent();

            this.ofc = ofc;

            SkinManager.AddFormToManage(this);

            ThreadPool.QueueUserWorkItem(async x =>
            {
                await Resync(true);
                Invoke((MethodInvoker)UpdateCurrentInformation);
            });
        }
Beispiel #18
0
        public BackGroundDim(MaterialForm FormToDim)
        {
            _FormToDim = FormToDim;
            InitializeComponent();
            SkinManager.AddFormToManage(this);
            StartPosition = FormStartPosition.Manual;
            Size          = FormToDim.Size;
            MinimumSize   = Size;
            Location      = FormToDim.Location;
            BackColor     = FormToDim.SkinManager.GetApplicationBackgroundColor();
            Opacity       = 0;

            SetStyle(ControlStyles.StandardDoubleClick, false);
            //Enabled = false;
            finalLocation = FormToDim.Location;;
            finalSize     = FormToDim.Size;

            FormToDim.LocationChanged += FormToDim_LocationChanged;
        }
        public AddRemoveView(Type formType, params object[] args)
        {
            Icon = Icon.ExtractAssociatedIcon("icon.ico");
            InitializeComponent();

            SkinManager.AddFormToManage(this);
            FormType  = formType;
            arguments = args;

            switch (formType)
            {
            case Type.AddAssignment:
                Text = "Add Assignment";
                addRemoveBtn.Text = "Add";
                line1.Hint        = "Summary";
                line2.Visible     = false;
                break;

            case Type.AddBolo:
                Text = "Add BOLO";
                addRemoveBtn.Text = "Add Bolo";
                line1.Hint        = "BOLO Reason";
                break;

            case Type.RemoveBolo:
                Text = "Remove BOLO";
                addRemoveBtn.Text = "Remove Bolo";
                line1.Hint        = "BOLO Index";
                line2.Visible     = false;
                break;

            case Type.AddNote:
                Text = "Add Note";
                addRemoveBtn.Text = "Add Note";
                line1.Hint        = "Note";
                line2.Visible     = false;
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(formType), formType, null);
            }
        }
        public MaterialSettings(MaterialForm Parent)
        {
            _IgnoreActivate = false;
            StartPosition   = FormStartPosition.Manual;

            Opacity   = 0;
            _BaseForm = Parent;
            SkinManager.AddFormToManage(this);
            MinimizeBox = false;
            MaximizeBox = false;


            InitializeComponent();



            _ThemeSettingsToolStripItem      = new MaterialToolStripMenuItem();
            _ThemeSettingsToolStripItem.Text = "Theme";
            MaterialThemeSettings objSettings = new MaterialThemeSettings(_BaseForm, this);

            objSettings.Dock = DockStyle.Fill;
            _ThemeSettingsToolStripItem.Tag = objSettings;
        }
Beispiel #21
0
        public Message911(Civilian civ, EmergencyCall call)
        {
            Icon = Icon.ExtractAssociatedIcon("icon.ico");
            InitializeComponent();

            SkinManager.AddFormToManage(this);

            this.civ  = civ;
            this.call = call;

            Text += $"{civ.First} {civ.Last}";

            Program.Client.LocalCallbacks.Events.Add(call.Id.ToString(), new LocalEvent(new Func <ConnectedPeer, string, Task>(Msg911)));
            Program.Client.LocalCallbacks.Events.Add("end" + call.Id, new LocalEvent(new Func <ConnectedPeer, Task>(End911)));

            Closed += async delegate
            {
                await Program.Client.Peer.RemoteCallbacks.Events["911End"].Invoke(call.Id);

                Program.Client.LocalCallbacks.Events.Remove("end" + call.Id);
                Program.Client.LocalCallbacks.Events.Remove(call.Id.ToString());
            };
        }
Beispiel #22
0
        public Form1()
        {
            ((Control)this).SuspendDrawing();
            InitializeComponent();

            folder         = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
            specificFolder = Path.Combine(folder, "MathsBattle");

            if (!Directory.Exists(specificFolder))
            {
                Directory.CreateDirectory(specificFolder);
            }
            if (File.Exists(Path.Combine(specificFolder, "Settings.xml")))
            {
                gameSettings = DeserializeObject <GameSettings>(Path.Combine(specificFolder, "Settings.xml"));
            }
            else
            {
                gameSettings = new GameSettings();
                gameSettings.ResetSettings();
                string str = SerializeObject <GameSettings>(gameSettings);
                File.WriteAllText(Path.Combine(specificFolder, "Settings.xml"), str, Encoding.Unicode);
            }

            SkinManager.AddFormToManage(this);
            SkinManager.Theme       = gameSettings.DarkTheme ? MaterialSkinManager.Themes.DARK : MaterialSkinManager.Themes.LIGHT;
            SkinManager.ColorScheme = new ColorScheme(Primary.Blue500, Primary.Blue700, Primary.Blue100, Accent.Blue200, TextShade.WHITE);

#pragma warning disable CS0162
            if (NO_BG)
            {
                foreach (TabPage tb in Screens.TabPages)
                {
                    tb.BackgroundImage = null;
                }
                panelFormBG.BackgroundImage = null;
            }
            else
            {
                if (SkinManager.Theme == MaterialSkinManager.Themes.DARK)
                {
                    foreach (TabPage tb in Screens.TabPages)
                    {
                        tb.BackgroundImage = Properties.Resources.StartScreenBGDark;
                    }
                    panelFormBG.BackgroundImage = Properties.Resources.StartScreenBGDark;
                }
                else
                {
                    foreach (TabPage tb in Screens.TabPages)
                    {
                        tb.BackgroundImage = Properties.Resources.StartScreenBG;
                    }
                    panelFormBG.BackgroundImage = Properties.Resources.StartScreenBG;
                }
            }
#pragma warning restore CS0162
            if (SkinManager.Theme == MaterialSkinManager.Themes.DARK)
            {
                btnNextTip.Icon = Properties.Resources.navRight;
                btnPrevTip.Icon = Properties.Resources.navLeft;
                btnExQuit.Icon  = Properties.Resources.quit;
                btnQuit.Icon    = Properties.Resources.quit;
            }
            else
            {
                btnNextTip.Icon = Properties.Resources.navRightDark;
                btnPrevTip.Icon = Properties.Resources.navLeftDark;
                btnExQuit.Icon  = Properties.Resources.quitDark;
                btnQuit.Icon    = Properties.Resources.quitDark;
            }
            Random rnd = new Random((int)DateTime.Now.Ticks);
            tipsNo       = rnd.Next(0, tips.Count());
            lblTips.Text = tips[tipsNo];
            if (!gameSettings.BattleExerciseBackgroundImage)
            {
                screenBattle.BackgroundImage   = null;
                screenExercise.BackgroundImage = null;
            }
            panelBattle.BackColor        = Color.FromArgb(175, SkinManager.GetApplicationBackgroundColor());
            panelTips.BackColor          = Color.FromArgb(175, SkinManager.GetApplicationBackgroundColor());
            panelRightDock.BackColor     = Color.FromArgb(175, SkinManager.GetApplicationBackgroundColor());
            panelDialogBG.BackColor      = Color.FromArgb(100, Color.Black);
            panelQuestionAlign.BackColor = Color.Transparent;
            panelDialog.BackColor        = Color.Transparent;
            foreach (Control c in panelBattle.Controls)
            {
                if (SupportsTransparentBackColor(c))
                {
                    c.BackColor = Color.Transparent;
                }
            }
            foreach (Control c in panelOppFooter.Controls)
            {
                if (SupportsTransparentBackColor(c))
                {
                    c.BackColor = Color.Transparent;
                }
            }
            foreach (Control c in panelRightDock.Controls)
            {
                if (SupportsTransparentBackColor(c))
                {
                    c.BackColor = Color.Transparent;
                }
            }
            foreach (Control c in panelTips.Controls)
            {
                if (SupportsTransparentBackColor(c))
                {
                    c.BackColor = Color.Transparent;
                }
            }
            foreach (Control c in panelGameOverFooter.Controls)
            {
                if (SupportsTransparentBackColor(c))
                {
                    c.BackColor = Color.Transparent;
                }
            }
            foreach (Control c in screenExercise.Controls)
            {
                if (SupportsTransparentBackColor(c))
                {
                    c.BackColor = Color.Transparent;
                }
            }
            lblHelpContext.Text = Properties.Resources.Help;
            ((Control)this).ResumeDrawing();
            SwitchScreen(screenStart);
        }