Exemplo n.º 1
0
        private void buttonAdd_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (!mainCanvas.Children.Contains(nameGroup))
            {
                nameGroup = new TextBox
                {
                    Width      = 270,
                    Height     = 26,
                    FontSize   = 18,
                    MaxLength  = 30,
                    Background = new SolidColorBrush(Color.FromArgb(255, 0, 123, 255)),
                };
                Canvas.SetLeft(nameGroup, 40);
                Canvas.SetTop(nameGroup, 368);
                mainCanvas.Children.Add(nameGroup);
                nameGroup.PreviewMouseLeftButtonDown  += nameGroup_DisableError;
                nameGroup.PreviewMouseRightButtonDown += nameGroup_DisableError;

                buttonSaveGroup = ButtonCreator.CreateButton(mainCanvas, "Dodaj", 80, 28, 12, 320, 368,
                                                             Color.FromArgb(255, 55, 55, 55), Color.FromArgb(255, 255, 255, 255), 1);
                buttonSaveGroup.Background           = new SolidColorBrush(Color.FromArgb(255, 200, 200, 200));
                buttonSaveGroup.MouseEnter          += buttonSaveGroup_MouseEnter;
                buttonSaveGroup.MouseLeave          += buttonSaveGroup_MouseLeave;
                buttonSaveGroup.MouseLeftButtonDown += buttonSaveGroup_MouseLeftButtonDown;

                buttonClose = ButtonCreator.CreateButton(mainCanvas, "X", 25, 25, 11, 415, 370,
                                                         Color.FromArgb(255, 255, 255, 255), Color.FromArgb(255, 255, 255, 255), 1);
                buttonClose.Background = new SolidColorBrush(Color.FromArgb(185, 240, 0, 0));
                buttonClose.FontWeight = FontWeights.ExtraBold;
                ButtonCreator.SetToolTip(buttonClose, "Anuluj");
                buttonClose.MouseEnter          += buttonClose_MouseEnter;
                buttonClose.MouseLeave          += buttonClose_MouseLeave;
                buttonClose.MouseLeftButtonDown += buttonClose_MouseLeftButtonDown;
            }
        }
Exemplo n.º 2
0
        public JoinApplications(ref Canvas canvas)
        {
            this.canvas = canvas;
            mainCanvas  = CanvasCreator.CreateCanvas(canvas, 620, 410, Color.FromArgb(255, 226, 240, 255), 0, 0);
            applicationsWithoutGroup = new Canvas()
            {
                Width = 600, Height = 300,
            };

            loadingWindow = new LoadingWindow(ref this.canvas);
            backgroundWorkerLoadingWindow         = new BackgroundWorker();
            backgroundWorkerLoadingWindow.DoWork += loadingWindow.Load;
            backgroundWorkerLoadingWindow.RunWorkerAsync();

            ScrollViewer sv = ScrollViewerCreator.CreateScrollViewer(mainCanvas, 560, 300, 30, 60, applicationsWithoutGroup);
            MyLabel      labelNonAssignedApplication = new MyLabel(mainCanvas, "Aplikacje bez przypisanej grupy",
                                                                   370, 38, 18, 30, 10, Color.FromArgb(255, 0, 123, 255), Color.FromArgb(200, 0, 56, 255));

            labelNonAssignedApplication.SetFont("Verdana");

            buttonCloseCanvas = ButtonCreator.CreateButton(mainCanvas, "Zamknij", 80, 30, 13, 510, 370,
                                                           Color.FromArgb(255, 0, 123, 255), Color.FromArgb(200, 0, 56, 255), 1);
            buttonCloseCanvas.MouseLeftButtonDown += buttonCloseCanvas_MouseLeftButtonDown;

            var backgroundWorkerUpdateContent = new BackgroundWorker();

            backgroundWorkerUpdateContent.DoWork += UpdateContent;
            backgroundWorkerUpdateContent.RunWorkerAsync();
        }
Exemplo n.º 3
0
        private void CreateButton()
        {
            int num = 40;

            this.buttonList = new List <Button>();
            for (int i = 0; i < num; i++)
            {
                Button button = ButtonCreator.Create(this.p_Main, i);
                button.Text      = "默认" + (i + 1).ToString();
                button.BackColor = Color.FromArgb(0, 255, 0);
                button.ForeColor = Color.Black;
                button.Font      = new Font(button.Font.FontFamily, 11f, FontStyle.Bold);

                button.Width   = 60;
                button.Height  = 60;
                button.Visible = false;


                this.buttonList.Add(button);
            }
            //num3 -= this.buttonList[i - 1].Width;
            //button.Top = p_Main.Height - button.Height;
            //button.Left = num3;
            //int width = 0;

            //for (int i = 0; i < buttonList.Count; i++)
            //{
            //    buttonList[i].Top = p_Main.Height - buttonList[i].Height-2;
            //    width += buttonList[i].Width;
            //    buttonList[i].Top = width-4;
            //}
        }
        private void CreateListOfAddedApps()
        {
            applicationInActivity = new Canvas()
            {
                Width = 140, Height = 146, Background = new SolidColorBrush(Color.FromArgb(255, 236, 236, 236))
            };
            ScrollViewer sv = ScrollViewerCreator.CreateScrollViewer(contentCanvas, 140, 146, 440, 60, applicationInActivity);

            sv.Focusable = false;

            new MyLabel(contentCanvas, "Dodane aplikacje", 140, 30, 14, 440, 20,
                        Color.FromArgb(205, 125, 125, 125), Color.FromArgb(200, 255, 255, 255), 0);

            Label buttonDeleteAllApplication = ButtonCreator.CreateButton(contentCanvas, "Usuń wszystkie", 120, 28, 12, 450, 220,
                                                                          Color.FromArgb(255, 255, 255, 255), Color.FromArgb(200, 255, 0, 0), 1);

            ButtonCreator.SetToolTip(buttonDeleteAllApplication, "Usuń wszystkie aplikacje z aktywności");
            buttonDeleteAllApplication.Background           = new SolidColorBrush(Color.FromArgb(120, 255, 93, 93));
            buttonDeleteAllApplication.MouseEnter          += buttonDeleteAllApplication_MouseEnter;
            buttonDeleteAllApplication.MouseLeave          += buttonDeleteAllApplication_MouseLeave;
            buttonDeleteAllApplication.MouseLeftButtonDown += buttonDeleteAllApplication_MouseLeftButtonDown;

            Label buttonEditActivity = ButtonCreator.CreateButton(contentCanvas, "Edytuj aktywność", 120, 28, 12, 450, 260,
                                                                  Color.FromArgb(255, 255, 255, 255), Color.FromArgb(255, 0, 255, 0), 1);

            buttonEditActivity.Background           = new SolidColorBrush(Color.FromArgb(60, 0, 200, 0));
            buttonEditActivity.MouseEnter          += buttonEditActivity_MouseEnter;
            buttonEditActivity.MouseLeave          += buttonEditActivity_MouseLeave;
            buttonEditActivity.MouseLeftButtonDown += buttonEditActivity_MouseLeftButtonDown;
        }
Exemplo n.º 5
0
        private void LoadGroupName()
        {
            Dictionary <string, string> namesGroup = Membership_db.GetNameGroupsDictionaryWithConfiguration();
            int nextIndex = 0;

            contentCanvas.Height = 316;
            foreach (KeyValuePair <string, string> name in namesGroup)
            {
                Label group = ButtonCreator.CreateButton(contentCanvas, name.Value, 250, 29, 12, 20, 0 + (nextIndex * 32),
                                                         Color.FromArgb(255, 255, 255, 255), Color.FromArgb(255, 155, 155, 155));
                group.Background           = new SolidColorBrush(Color.FromArgb((byte)(50 + (nextIndex % 2 * 30)), 0, 125, 255));
                group.Name                 = "ID_" + name.Key;
                group.MouseEnter          += buttonContent_MouseEnter;
                group.MouseLeave          += buttonContent_MouseLeave;
                group.MouseLeftButtonDown += buttonEditGroup_MouseLeftButtonDown;
                ButtonCreator.SetToolTip(group, "Edytuj");

                contentCanvas.Height += 32;
                nextIndex++;
            }
            contentCanvas.Height = ((contentCanvas.Height - 316) < 316) ? 316 : contentCanvas.Height - 315;

            if (!namesGroup.Any())
            {
                new MyLabel(contentCanvas, "Brak konfiguracji", 120, 40, 12, 90, 10, Color.FromArgb(200, 255, 255, 255), Color.FromArgb(255, 230, 0, 0));
            }
        }
Exemplo n.º 6
0
            static void DrawBlackButtons()
            {
                backButton = ButtonCreator.SpawnBlackButton(rootTransform.gameObject, new Vector2(UIConfig.blackButtonWidth, UIConfig.blackButtonHeight), "Back", new List <TMPro.TextMeshProUGUI>(), true);
                backButton.transform.parent.GetComponent <RectTransform>().localPosition = new Vector3(UIConfig.offsetHorizontal, -UIConfig.offsetVertical - UIConfig.blueButtonCount[Data.mode] * (UIConfig.blueButtonHeight + UIConfig.spacingVertical) - storeHeight - UIConfig.spacingVertical, 0);
                backButton.GetComponent <RoR2.UI.HGButton>().onClick.AddListener(() => {
                    SetMenuTitle();
                });
                shopInterfaces.Add(backButton.transform.parent.gameObject);

                GameObject statusButton = ButtonCreator.SpawnBlackButton(rootTransform.gameObject, new Vector2(UIConfig.blackButtonWidth, UIConfig.blackButtonHeight), "", statusTexts);

                statusButton.transform.parent.GetComponent <RectTransform>().localPosition = new Vector3(UIConfig.offsetHorizontal + UIConfig.blackButtonWidth + UIConfig.spacingHorizontal, -UIConfig.offsetVertical - UIConfig.blueButtonCount[Data.mode] * (UIConfig.blueButtonHeight + UIConfig.spacingVertical) - storeHeight - UIConfig.spacingVertical, 0);
                statusButton.GetComponent <RoR2.UI.HGButton>().onClick.AddListener(() => {
                    Data.ToggleEnabled();
                });
                shopInterfaces.Add(statusButton.transform.parent.gameObject);

                GameObject infoButton = ButtonCreator.SpawnBlackButton(UIDrawer.rootTransform.gameObject, new Vector2(UIConfig.blackButtonWidth / 2f, UIConfig.blackButtonHeight), "?", new List <TMPro.TextMeshProUGUI>());

                infoButton.transform.parent.GetComponent <RectTransform>().localPosition = new Vector3(UIDrawer.rootTransform.rect.width - UIConfig.offsetHorizontal - UIConfig.blackButtonWidth / 2f, -UIConfig.offsetVertical - UIConfig.blueButtonCount[Data.mode] * (UIConfig.blueButtonHeight + UIConfig.spacingVertical) - UIDrawer.storeHeight - UIConfig.spacingVertical, 0);
                infoButton.GetComponent <RoR2.UI.HGButton>().onClick.AddListener(() => {
                    DrawInfoPanel();
                });
                UIDrawer.shopInterfaces.Add(infoButton.transform.parent.gameObject);
            }
        public HistoryActivity(ref Canvas canvas)
        {
            this.canvas   = canvas;
            allData_db    = new AllData_db();
            mainCanvas    = CanvasCreator.CreateCanvas(canvas, 620, 410, Color.FromArgb(255, 226, 240, 255), 0, 0);
            contentCanvas = CanvasCreator.CreateCanvas(mainCanvas, 620, 360, Color.FromArgb(255, 236, 236, 236), 0, 50);
            new MyRectangle(mainCanvas, 620, 1, Color.FromArgb(60, 110, 110, 110), 0, 50);

            MyLabel l = new MyLabel(mainCanvas, "Historia aktywności", 200, 38, 18, 30, 10, Color.FromArgb(255, 0, 123, 255), Color.FromArgb(200, 0, 56, 255));

            l.SetFont("Verdana");

            new MyLabel(mainCanvas, "x", 30, 50, 24, 590, 10, Color.FromArgb(255, 70, 70, 70),
                        Color.FromArgb(255, 70, 70, 70), 0);
            Label buttonCloseActivityHistory = ButtonCreator.CreateButton(mainCanvas, "", 30, 30, 14, 590, 20,
                                                                          Color.FromArgb(0, 155, 155, 155), Color.FromArgb(0, 155, 155, 155), 0);

            buttonCloseActivityHistory.Background           = new SolidColorBrush(Color.FromArgb(180, 215, 215, 215));
            buttonCloseActivityHistory.MouseEnter          += buttonCloseActivityHistory_MouseEnter;
            buttonCloseActivityHistory.MouseLeave          += buttonCloseActivityHistory_MouseLeave;
            buttonCloseActivityHistory.MouseLeftButtonDown += buttonCloseActivityHistory_MouseLeftButtonDown;

            CreateDatePickier();
            CreateChart();
        }
Exemplo n.º 8
0
        private void CreateControlUser()
        {
            new MyLabel(mainCanvas, "+", 30, 50, 30, 0, 353, Color.FromArgb(255, 170, 170, 170),
                        Color.FromArgb(255, 170, 170, 170), 0);

            Label buttonAdd = ButtonCreator.CreateButton(mainCanvas, "", 30, 30, 14, 0, 366,
                                                         Color.FromArgb(0, 155, 155, 155), Color.FromArgb(255, 155, 155, 155), 1);

            buttonAdd.Background           = new SolidColorBrush(Color.FromArgb(0, 215, 215, 215));
            buttonAdd.MouseEnter          += buttonAdd_MouseEnter;
            buttonAdd.MouseLeave          += buttonAdd_MouseLeave;
            buttonAdd.MouseLeftButtonDown += buttonAdd_MouseLeftButtonDown;
            ButtonCreator.SetToolTip(buttonAdd, "Dodaj nową grupę");

            new MyLabel(mainCanvas, "x", 30, 50, 24, 573, 356, Color.FromArgb(255, 170, 170, 170),
                        Color.FromArgb(255, 70, 70, 70), 0);

            Label buttonExit = ButtonCreator.CreateButton(mainCanvas, "", 30, 30, 14, 573, 366,
                                                          Color.FromArgb(0, 155, 155, 155), Color.FromArgb(255, 155, 155, 155), 1);

            buttonExit.Background           = new SolidColorBrush(Color.FromArgb(0, 215, 215, 215));
            buttonExit.MouseEnter          += buttonExit_MouseEnter;
            buttonExit.MouseLeave          += buttonExit_MouseLeave;
            buttonExit.MouseLeftButtonDown += buttonExit_MouseLeftButtonDown;
            ButtonCreator.SetToolTip(buttonExit, "Zamknij okno");
        }
Exemplo n.º 9
0
        private void CreateComboBoxAndButtonGoFilter()
        {
            buttonChooseTimeInterval = ButtonCreator.CreateButton(filterCanvas, "Wybierz czas", 130, 30, 13, 360, 44,
                                                                  Color.FromArgb(255, 255, 255, 255), Color.FromArgb(255, 155, 155, 155));
            buttonChooseTimeInterval.Background           = new SolidColorBrush(Color.FromArgb(35, 2, 53, 101));
            buttonChooseTimeInterval.MouseEnter          += Behavior_MouseEnter;
            buttonChooseTimeInterval.MouseLeave          += Behavior_MouseLeave;
            buttonChooseTimeInterval.MouseLeftButtonDown += ChooseTimeInterval;

            intervalTimeCanvas            = CanvasCreator.CreateCanvas(filterCanvas, 130, 100, Color.FromArgb(0, 0, 123, 255), 360, 80);
            intervalTimeCanvas.Visibility = Visibility.Hidden;

            for (int i = 0; i < 5; i++)
            {
                Label intervalTime = ButtonCreator.CreateButton(intervalTimeCanvas, tableNameTitleInterval[i], 130, 26, 10, 0, 0 + (i * 27),
                                                                Color.FromArgb(255, 255, 255, 255), Color.FromArgb(255, 155, 155, 155));
                intervalTime.Background           = new SolidColorBrush(Color.FromArgb(100, 0, 123, 255));
                intervalTime.Name                 = "ID_" + i;
                intervalTime.MouseEnter          += Behavior_MouseEnter;
                intervalTime.MouseLeave          += intervalTime_MouseLeave;
                intervalTime.MouseLeftButtonDown += intervalTime_MouseLeftButtonDown;
            }

            buttonGoFilter = ButtonCreator.CreateButton(filterCanvas, "Filtruj", 80, 30, 14, 514, 44,
                                                        Color.FromArgb(255, 255, 255, 255), Color.FromArgb(255, 155, 155, 155));
            buttonGoFilter.Background           = new SolidColorBrush(Color.FromArgb(35, 2, 53, 101));
            buttonGoFilter.MouseEnter          += Behavior_MouseEnter;
            buttonGoFilter.MouseLeave          += Behavior_MouseLeave;
            buttonGoFilter.MouseLeftButtonDown += GoFilter;
        }
Exemplo n.º 10
0
        private void buttonShowApplications_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            showApplicationsCanvas       = CanvasCreator.CreateCanvas(canvas, 620, 400, Color.FromArgb(200, 30, 39, 93), 10, 10);
            contentCanvasShowApplication = new Canvas()
            {
                Width = 420, Height = 310, Background = new SolidColorBrush(Color.FromArgb(200, 30, 39, 93))
            };
            ScrollViewerCreator.CreateScrollViewer(showApplicationsCanvas, 420, 310, 80, 40, contentCanvasShowApplication);

            new MyLabel(showApplicationsCanvas, "x", 30, 50, 24, 573, 356, Color.FromArgb(255, 170, 170, 170),
                        Color.FromArgb(255, 70, 70, 70), 0);

            Label buttonExit = ButtonCreator.CreateButton(showApplicationsCanvas, "", 30, 30, 14, 573, 366,
                                                          Color.FromArgb(0, 155, 155, 155), Color.FromArgb(255, 155, 155, 155), 1);

            buttonExit.Background           = new SolidColorBrush(Color.FromArgb(0, 215, 215, 215));
            buttonExit.MouseEnter          += buttonExit_MouseEnter;
            buttonExit.MouseLeave          += buttonExit_MouseLeave;
            buttonExit.MouseLeftButtonDown += buttonCloseShowApplication_MouseLeftButtonDown;
            ButtonCreator.SetToolTip(buttonExit, "Zamknij okno");

            activeGroupId = Convert.ToInt32(((sender as Label).Name).Replace("ID_", ""));
            BackgroundWorker backgroundWorkerUpdateContent = new BackgroundWorker();

            backgroundWorkerUpdateContent.DoWork += LoadContent;
            backgroundWorkerUpdateContent.RunWorkerAsync();
        }
Exemplo n.º 11
0
        private void LoadNonTitleApplication()
        {
            Dictionary <string, string> idNonActiveWindow = NonActiveWindow_db.GetIDNonActiveWindow();

            nonTitleApplicationCanvas.Children.Clear();
            nonTitleApplicationCanvas.Height = 286;
            int nextIndex = 0;

            foreach (KeyValuePair <string, string> name in idNonActiveWindow)
            {
                Label application = ButtonCreator.CreateButton(nonTitleApplicationCanvas,
                                                               (nextIndex + 1) + "." + "\t" + name.Value.Remove(10) + "\t" + ActionOnTime.GetTimeAndDays(Convert.ToInt32(NonActiveWindow_db.GetTimeNonActiveWindow(name.Key))),
                                                               250, 29, 11, 20, 0 + (nextIndex * 32), Color.FromArgb(255, 255, 255, 255), Color.FromArgb(255, 155, 155, 155), horizontalAlignment: HorizontalAlignment.Left);
                application.Background           = new SolidColorBrush(Color.FromArgb((byte)(50 + (nextIndex % 2 * 30)), 0, 125, 255));
                application.Name                 = "ID_" + name.Key;
                application.MouseEnter          += buttonContent_MouseEnter;
                application.MouseLeave          += buttonContent_MouseLeave;
                application.MouseLeftButtonDown += selectNonTitleApplication_MouseLeftButtonDown;

                Label deleteButton = ButtonCreator.CreateButton(nonTitleApplicationCanvas, "X", 22, 22, 8, 244, 3 + (nextIndex * 32),
                                                                Color.FromArgb(255, 255, 255, 255), Color.FromArgb(255, 155, 155, 155), 1);
                deleteButton.Background           = new SolidColorBrush(Color.FromArgb(100, 250, 0, 0));
                deleteButton.Name                 = "ID_" + name.Key;
                deleteButton.MouseEnter          += deleteButton_MouseEnter;
                deleteButton.MouseLeave          += deleteButton_MouseLeave;
                deleteButton.MouseLeftButtonDown += deleteButton_MouseLeftButtonDown;

                nonTitleApplicationCanvas.Height += 32;
                nextIndex++;
            }
            nonTitleApplicationCanvas.Height = ((nonTitleApplicationCanvas.Height - 286) < 286) ? 286 : nonTitleApplicationCanvas.Height - 285;
            idAddNewTitleApplication         = 0;
        }
Exemplo n.º 12
0
        private void CreateButtonsAndTextBox()
        {
            buttonAddException = ButtonCreator.CreateButton(MainCanvasSettings, addApplicationToException, 276, 30, 13, 10, 50,
                                                            Color.FromArgb(255, 255, 255, 255), Color.FromArgb(0, 0, 0, 0));
            buttonAddException.Background           = new SolidColorBrush(Color.FromArgb(255, 2, 53, 101));
            buttonAddException.MouseEnter          += Behavior_MouseEnter;
            buttonAddException.MouseLeave          += Behavior_MouseLeave;
            buttonAddException.MouseLeftButtonDown += buttonAddException_MouseLeftButtonDown;

            nameApplicationToException = new TextBox
            {
                Text       = defaultContentnameApplicationToException,
                Width      = 216,
                Height     = 26,
                FontSize   = 15,
                MaxLength  = 30,
                Background = new SolidColorBrush(Color.FromArgb(255, 225, 225, 225)),
                Foreground = new SolidColorBrush(Color.FromArgb(255, 85, 85, 85)),
                FontFamily = new FontFamily("Comic Sans MS"),
            };
            Canvas.SetLeft(nameApplicationToException, 10);
            Canvas.SetTop(nameApplicationToException, 100);
            MainCanvasSettings.Children.Add(nameApplicationToException);
            nameApplicationToException.PreviewMouseLeftButtonDown += nameApplicationToException_MouseLeftButtonDown;
            nameApplicationToException.Visibility = Visibility.Hidden;

            buttonAcceptAddException = ButtonCreator.CreateButton(MainCanvasSettings, "Szukaj", 54, 30, 13, 232, 98,
                                                                  Color.FromArgb(255, 255, 255, 255), Color.FromArgb(0, 0, 0, 0));
            buttonAcceptAddException.Background           = new SolidColorBrush(Color.FromArgb(255, 2, 53, 101));
            buttonAcceptAddException.MouseEnter          += Behavior_MouseEnter;
            buttonAcceptAddException.MouseLeave          += Behavior_MouseLeave;
            buttonAcceptAddException.MouseLeftButtonDown += buttonAcceptAddException_MouseLeftButtonDown;
            buttonAcceptAddException.Visibility           = Visibility.Hidden;

            nameApplicationToChange = new TextBox
            {
                Text       = defaultContentnameApplicationToChange,
                Width      = 230,
                Height     = 26,
                FontSize   = 15,
                MaxLength  = 30,
                Background = new SolidColorBrush(Color.FromArgb(255, 225, 225, 225)),
                Foreground = new SolidColorBrush(Color.FromArgb(255, 85, 85, 85)),
                FontFamily = new FontFamily("Comic Sans MS"),
            };
            Canvas.SetLeft(nameApplicationToChange, 310);
            Canvas.SetTop(nameApplicationToChange, 350);
            MainCanvasSettings.Children.Add(nameApplicationToChange);
            nameApplicationToChange.PreviewMouseLeftButtonDown += nameApplicationToChange_MouseLeftButtonDown;
            nameApplicationToChange.Visibility = Visibility.Hidden;

            buttonSaveNewName = ButtonCreator.CreateButton(MainCanvasSettings, "Zapisz", 54, 30, 13, 545, 348,
                                                           Color.FromArgb(255, 255, 255, 255), Color.FromArgb(0, 0, 0, 0));
            buttonSaveNewName.Background           = new SolidColorBrush(Color.FromArgb(255, 2, 53, 101));
            buttonSaveNewName.MouseEnter          += Behavior_MouseEnter;
            buttonSaveNewName.MouseLeave          += Behavior_MouseLeave;
            buttonSaveNewName.MouseLeftButtonDown += buttonSaveNewName_MouseLeftButtonDown;
            buttonSaveNewName.Visibility           = Visibility.Hidden;
        }
Exemplo n.º 13
0
        private void LoadNonAssignedApplication()
        {
            List <ActiveApplication> titlesAllNotAssignedApplication = ActiveApplication_db.GetNonJoinedApplication();

            for (int i = 0; i < titlesAllNotAssignedApplication.Count; i++)
            {
                Thread.Sleep(10);
                Application.Current.Dispatcher.Invoke(() =>
                {
                    applicationWithoutGroup = new Canvas();
                    applicationWithoutGroup = CanvasCreator.CreateCanvas(applicationsWithoutGroup, 560, 60,
                                                                         Color.FromArgb(0, 110, 0, 0), 0, 59 * i);
                });
                string titleApplication = string.Empty;
                titleApplication = (titlesAllNotAssignedApplication[i].Title.Length > 40) ?
                                   titlesAllNotAssignedApplication[i].Title.Remove(40, titlesAllNotAssignedApplication[i].Title.Length - 40) : titlesAllNotAssignedApplication[i].Title;

                Application.Current.Dispatcher.Invoke(() =>
                {
                    new MyCircle(applicationWithoutGroup, 46, 2, Color.FromArgb(255, 150, 150, 150), 8, 8, 1, true);

                    MyLabel l = new MyLabel(applicationWithoutGroup, "\t" + titleApplication,
                                            560, 60, 14, 0, 0, Color.FromArgb(255, 120, 120, 120), Color.FromArgb(30, 100, 100, 100), 1,
                                            HorizontalAlignment.Left, fontWeight: FontWeights.Bold);
                    l.ToolTip(titlesAllNotAssignedApplication[i].Title);

                    new MyLabel(applicationWithoutGroup, ActionOnString.GetFirstLetterFromString(titleApplication), 50, 50, 20, 6, 11, Color.FromArgb(255, 240, 240, 240),
                                Color.FromArgb(0, 100, 100, 100), 0, HorizontalAlignment.Center, fontWeight: FontWeights.ExtraBold);

                    new MyLabel(applicationWithoutGroup, titlesAllNotAssignedApplication[i].NameActivity, 300, 30, 12, 60, 30,
                                Color.FromArgb(255, 120, 120, 120), Color.FromArgb(30, 100, 100, 100), horizontalAlignment: HorizontalAlignment.Left);

                    new MyLabel(applicationWithoutGroup, ActionOnTime.GetNumberDayAgo(titlesAllNotAssignedApplication[i].Date), 100, 30, 13, 466, 0, Color.FromArgb(255, 120, 120, 120),
                                Color.FromArgb(30, 100, 100, 100), horizontalAlignment: HorizontalAlignment.Left);

                    new MyLabel(applicationWithoutGroup, "(" + (titlesAllNotAssignedApplication.Count - i) + ")", 100, 30, 9, 420, 0, Color.FromArgb(255, 120, 120, 120),
                                Color.FromArgb(30, 100, 100, 100), horizontalAlignment: HorizontalAlignment.Left);

                    new MyCircle(applicationWithoutGroup, 25, 1, (Color.FromArgb(255, 0, 123, 255)), 525, 28, setFill: true);

                    Label buttonAddActivity = ButtonCreator.CreateButton(applicationWithoutGroup, "+", 25, 34, 20, 525, 28,
                                                                         Color.FromArgb(255, 255, 255, 255), Color.FromArgb(200, 255, 0, 0), 0, fontWeight: FontWeights.ExtraBold);
                    buttonAddActivity.Margin               = new Thickness(0, -8, 0, 0);
                    applicationWithoutGroup.Name           = "ID_" + titlesAllNotAssignedApplication[i].ID;
                    buttonAddActivity.MouseLeftButtonDown += buttonAddActivity_MouseLeftButtonDown;
                    applicationsWithoutGroup.Height       += 59;
                });
            }
            Application.Current.Dispatcher.Invoke(() =>
            {
                applicationsWithoutGroup.Height = ((applicationsWithoutGroup.Height - 300) < 300) ? 300 : applicationsWithoutGroup.Height - 299;
            });
            loadingWindow.notClose = false;
            Thread.Sleep(200);
            backgroundWorkerLoadingWindow.DoWork -= loadingWindow.Load;
            backgroundWorkerLoadingWindow.DoWork += loadingWindow.Close;
            backgroundWorkerLoadingWindow.RunWorkerAsync();
        }
        public WindowAddTo(Canvas parent, AddTo addTo)
        {
            InitializeComponent();
            IsClosed     = false;
            parentCanvas = parent;
            windowAddTo  = addTo;

            if (parent.Tag is int)
            {
                idMembership = Convert.ToInt32(parent.Tag);
            }
            if (idMembership == 0)
            {
                idApplication = parent.Name.Replace("ID_", "");
            }

            timerAnimation          = new DispatcherTimer();
            timerAnimation.Interval = new TimeSpan(0, 0, 0, 0, 10);
            repeatIntervals         = 0;

            Canvas activity = new Canvas()
            {
                Width = 150, Height = 200,
            };
            ScrollViewer sv = ScrollViewerCreator.CreateScrollViewer(addToCanvas, 150, 200, 0, 0, activity);

            Dictionary <string, string> names = new Dictionary <string, string>();

            if (addTo == AddTo.Activity)
            {
                names = NameActivity_db.GetNameActivityDictionary();
            }
            else if (addTo == AddTo.Group)
            {
                names = Membership_db.GetNameGroupsDictionaryIfIsActive();
            }

            int nextIndex = 0;

            foreach (KeyValuePair <string, string> name in names)
            {
                Label button = ButtonCreator.CreateButton(activity, name.Value, 150, 30, 12, 0, 29 * nextIndex,
                                                          Color.FromArgb(255, 255, 255, 255), Color.FromArgb(200, 255, 255, 255), 1);
                activity.Height += 29;

                button.MouseEnter          += button_MouseEnter;
                button.MouseLeave          += button_MouseLeave;
                button.MouseLeftButtonDown += button_MouseLeftButtonDown;
                button.Name = "ID_" + name.Key;
                nextIndex++;
            }
            activity.Height = ((activity.Height - 200) < 200) ? 200 : activity.Height - 199;

            timerAnimation.Tick += new EventHandler(AnimationAddShow);
            timerAnimation.Start();
        }
Exemplo n.º 15
0
 private void CreateButtonShowFilter()
 {
     ImageCreator.CreateImage(MainCanvasStatistics, 26, 26, 490, 4, "Pictures/showFilter.png");
     buttonShowFilter = ButtonCreator.CreateButton(MainCanvasStatistics, "        Pokaż filtry", 114, 30, 13, 484, 2,
                                                   Color.FromArgb(255, 255, 255, 255), Color.FromArgb(0, 0, 0, 0));
     buttonShowFilter.Background           = new SolidColorBrush(Color.FromArgb(35, 2, 53, 101));
     buttonShowFilter.MouseEnter          += Behavior_MouseEnter;
     buttonShowFilter.MouseLeave          += Behavior_MouseLeave;
     buttonShowFilter.MouseLeftButtonDown += buttonShowFilter_MouseLeftButtonDown;
 }
        private UIElement OutputPathBullet()
        {
            Predicate <string> validityCheck = path => Directory.Exists(path);
            Action <string>    onPathChanged = path => OutputResultPath = path;
            var textBox = InteractiveTextBox.Create(OutputResultPath, validityCheck, onPathChanged, Dispatcher);

            return(HorizontalContainerStrecherd.Create()
                   .AddLeft(TextBlockCreator.RegularTextBlock("Result Output Folder").WithBullet())
                   .AddRight(ButtonCreator.Create("...", () => DialogCreator.ChooseFolder(path => textBox.Text = path)))
                   .AsDock(textBox));
        }
Exemplo n.º 17
0
        private void CreateDeleteApplicationWithFilterButton()
        {
            deleteApplicationWithFilterButton = ButtonCreator.CreateButton(addConfigurationCanvas, "Usuń aplikacje z filtru", 180, 26, 12, 350, 250,
                                                                           Color.FromArgb(255, 255, 255, 255), Color.FromArgb(255, 155, 155, 155));
            deleteApplicationWithFilterButton.Background           = new SolidColorBrush(Color.FromArgb(50, 0, 125, 255));
            deleteApplicationWithFilterButton.MouseEnter          += buttonContent_MouseEnter;
            deleteApplicationWithFilterButton.MouseLeave          += buttonContent_MouseLeave;
            deleteApplicationWithFilterButton.MouseLeftButtonDown += deleteApplicationWithFilterButton_MouseLeftButtonDown;

            resultsDeleteApplication = new MyLabel(addConfigurationCanvas, "", 150, 30, 10, 350, 290,
                                                   Color.FromArgb(255, 255, 255, 255), Color.FromArgb(255, 70, 70, 70), 0, System.Windows.HorizontalAlignment.Left);
            resultsDeleteApplication.Visibility = System.Windows.Visibility.Hidden;
        }
Exemplo n.º 18
0
        private void CreateAddFilterButton()
        {
            addFiltrPlus = new MyLabel(addConfigurationCanvas, "+", 30, 50, 24, 90, 200, Color.FromArgb(255, 170, 170, 170),
                                       Color.FromArgb(255, 70, 70, 70), 0);

            addFiltrButton = ButtonCreator.CreateButton(addConfigurationCanvas, "", 30, 30, 14, 90, 209,
                                                        Color.FromArgb(0, 155, 155, 155), Color.FromArgb(255, 155, 155, 155), 1);
            addFiltrButton.Background           = new SolidColorBrush(Color.FromArgb(0, 215, 215, 215));
            addFiltrButton.MouseEnter          += buttonExit_MouseEnter;
            addFiltrButton.MouseLeave          += buttonExit_MouseLeave;
            addFiltrButton.MouseLeftButtonDown += buttonaddFiltr_MouseLeftButtonDown;
            ButtonCreator.SetToolTip(addFiltrButton, "Dodaj filtr");
        }
Exemplo n.º 19
0
 static public void CreateMenuButton()
 {
     if (logbookButton != null)
     {
         GameObject button = ButtonCreator.SpawnBlueButton(logbookButton.transform.parent.gameObject, new Vector2(0, 1), new Vector2(320, 48), "Item Drops", TMPro.TextAlignmentOptions.Left, new List <Image>());
         button.transform.SetSiblingIndex(logbookButton.transform.GetSiblingIndex());
         float localScale = logbookButton.GetComponent <RectTransform>().rect.width / 320;
         button.GetComponent <RectTransform>().localScale = new Vector3(localScale, localScale, 1);
         button.GetComponent <RoR2.UI.HGButton>().onClick.AddListener(() => {
             UIDrawer.SetMenuStartingItems();
         });
     }
 }
Exemplo n.º 20
0
        private void CreateApplyFilterButton()
        {
            applyFilterButton = ButtonCreator.CreateButton(addConfigurationCanvas, "Zastosuj filtr", 150, 26, 12, 30, 290,
                                                           Color.FromArgb(255, 255, 255, 255), Color.FromArgb(255, 155, 155, 155));
            applyFilterButton.Background           = new SolidColorBrush(Color.FromArgb(50, 0, 125, 255));
            applyFilterButton.MouseEnter          += buttonContent_MouseEnter;
            applyFilterButton.MouseLeave          += buttonContent_MouseLeave;
            applyFilterButton.MouseLeftButtonDown += applyFilterButton_MouseLeftButtonDown;
            applyFilterButton.Visibility           = System.Windows.Visibility.Hidden;

            resultsApplyFilter = new MyLabel(addConfigurationCanvas, "", 150, 30, 10, 190, 290,
                                             Color.FromArgb(255, 255, 255, 255), Color.FromArgb(255, 70, 70, 70), 0, System.Windows.HorizontalAlignment.Left);
            resultsApplyFilter.Visibility = System.Windows.Visibility.Hidden;
        }
Exemplo n.º 21
0
 private void CreateActivityFooter()
 {
     footerActivity        = new List <Label>();
     footerActivityCounter = new MyLabel[2];
     for (int i = 0; i < namesActivity.Length; i++)
     {
         footerActivity.Add(ButtonCreator.CreateButton(contentCanvas, namesActivity[i], 120, 28, 12, 0 + (i * 120), 320,
                                                       Color.FromArgb(255, 55, 55, 55), Color.FromArgb(255, 255, 255, 255), 1));
         footerActivity[i].Background = new SolidColorBrush(Color.FromArgb(255, 206, 206, 206));
     }
     for (int i = 0; i < 2; i++)
     {
         footerActivityCounter[i] = new MyLabel(contentCanvas, "", 24, 23, 10, 1 + i * 594, 298, Color.FromArgb(255, 100, 100, 100),
                                                Color.FromArgb(255, 200, 200, 200), 1, fontWeight: FontWeights.Bold);
     }
 }
        private UIElement InputGraphBullet()
        {
            Predicate <string> validityCheck = path => File.Exists(path) && GraphEmbedding.CanParse(path);
            Action <string>    onPathChanged = path =>
            {
                InputGraphPath = path;
                SetGraph(GraphEmbedding.FromText(File.ReadLines(path)));
            };
            var textBox = InteractiveTextBox.Create(InputGraphPath, validityCheck, onPathChanged, Dispatcher);

            InputGraphTextBox = textBox;
            return(HorizontalContainerStrecherd.Create()
                   .AddLeft(TextBlockCreator.RegularTextBlock("Input Graph").WithBullet())
                   .AddRight(ButtonCreator.Create("...", () => DialogCreator.ChooseFile(path => textBox.Text = path)))
                   .AsDock(textBox));
        }
Exemplo n.º 23
0
        private void CreateSaveDeleteConfigureButton()
        {
            saveConfigurationButton = ButtonCreator.CreateButton(addConfigurationCanvas, "Zapisz konfiguracje", 190, 30, 14, 20, 360,
                                                                 Color.FromArgb(255, 255, 255, 255), Color.FromArgb(255, 155, 155, 155));
            saveConfigurationButton.Background           = new SolidColorBrush(Color.FromArgb(50, 0, 125, 255));
            saveConfigurationButton.MouseEnter          += buttonContent_MouseEnter;
            saveConfigurationButton.MouseLeave          += buttonContent_MouseLeave;
            saveConfigurationButton.MouseLeftButtonDown += saveConfigurationButton_MouseLeftButtonDown;

            deleteConfigurationButton = ButtonCreator.CreateButton(addConfigurationCanvas, "Usuń konfiguracje", 190, 30, 14, 360, 360,
                                                                   Color.FromArgb(255, 255, 255, 255), Color.FromArgb(255, 155, 155, 155));
            deleteConfigurationButton.Background           = new SolidColorBrush(Color.FromArgb(50, 0, 125, 255));
            deleteConfigurationButton.MouseEnter          += buttonContent_MouseEnter;
            deleteConfigurationButton.MouseLeave          += buttonContent_MouseLeave;
            deleteConfigurationButton.MouseLeftButtonDown += deleteConfigurationButton_MouseLeftButtonDown;
        }
Exemplo n.º 24
0
        private bool FindApplication()
        {
            if (nameApplicationToException.Text.Length > 2)
            {
                Regex regex = new Regex(nameApplicationToException.Text.Trim(), RegexOptions.IgnoreCase);
                Dictionary <string, string> titleApplication     = ActiveApplication_db.GetNameApplicationDictionaryWithoutGroup();
                Dictionary <string, string> titleMembership      = Membership_db.GetNameGroupsDictionaryWithConfiguration();
                Dictionary <string, string> titleFindApplication = new Dictionary <string, string>();

                foreach (KeyValuePair <string, string> title in titleApplication)
                {
                    if (regex.Matches(title.Value).Count > 0)
                    {
                        titleFindApplication[title.Key] = title.Value;
                    }
                }

                foreach (KeyValuePair <string, string> title in titleMembership)
                {
                    if (regex.Matches(title.Value).Count > 0)
                    {
                        titleFindApplication[title.Key + "M"] = title.Value;
                    }
                }

                searchApplicationCanvas.Children.Clear();
                searchApplicationCanvas.Height = 252;
                int nextIndex = 0;
                foreach (KeyValuePair <string, string> name in titleFindApplication)
                {
                    Label application = ButtonCreator.CreateButton(searchApplicationCanvas, name.Value, 250, 29, 12, 20, 0 + (nextIndex * 32),
                                                                   Color.FromArgb(255, 255, 255, 255), Color.FromArgb(255, 155, 155, 155), horizontalAlignment: HorizontalAlignment.Left);
                    application.Background           = new SolidColorBrush(Color.FromArgb(155, 0, 125, 255));
                    application.Name                 = "ID_" + name.Key;
                    application.MouseEnter          += buttonContent_MouseEnter;
                    application.MouseLeave          += buttonContent_MouseLeave;
                    application.MouseLeftButtonDown += findApplication_MouseLeftButtonDown;

                    searchApplicationCanvas.Height += 32;
                    nextIndex++;
                }
                searchApplicationCanvas.Height = ((searchApplicationCanvas.Height - 252) < 252) ? 252 : searchApplicationCanvas.Height - 251;
                idAddExceptionApplication      = 0;
                return(nextIndex > 0);
            }
            return(false);
        }
Exemplo n.º 25
0
        private void SetEditModeActivity()
        {
            nameActivity.Visibility = Visibility.Hidden;
            nameEditActivity        = new TextBox
            {
                Width      = 270,
                Height     = 26,
                FontSize   = 18,
                MaxLength  = 30,
                Background = new SolidColorBrush(Color.FromArgb(255, 0, 123, 255)),
            };
            Canvas.SetLeft(nameEditActivity, 15);
            Canvas.SetTop(nameEditActivity, 15);
            mainCanvas.Children.Add(nameEditActivity);
            nameEditActivity.PreviewMouseLeftButtonDown  += nameEditActivity_DisableError;
            nameEditActivity.PreviewMouseRightButtonDown += nameEditActivity_DisableError;

            buttonSaveEditActivity = ButtonCreator.CreateButton(mainCanvas, "Dodaj", 80, 28, 12, 300, 14,
                                                                Color.FromArgb(255, 55, 55, 55), Color.FromArgb(255, 255, 255, 255), 1);
            buttonSaveEditActivity.Background           = new SolidColorBrush(Color.FromArgb(255, 200, 200, 200));
            buttonSaveEditActivity.MouseEnter          += buttonSaveEditActivity_MouseEnter;
            buttonSaveEditActivity.MouseLeave          += buttonSaveEditActivity_MouseLeave;
            buttonSaveEditActivity.MouseLeftButtonDown += buttonSaveEditActivity_MouseLeftButtonDown;

            buttonClose = ButtonCreator.CreateButton(mainCanvas, "X", 25, 25, 11, 400, 16,
                                                     Color.FromArgb(255, 255, 255, 255), Color.FromArgb(255, 255, 255, 255), 1);
            buttonClose.Background = new SolidColorBrush(Color.FromArgb(185, 240, 0, 0));
            buttonClose.FontWeight = FontWeights.ExtraBold;
            ButtonCreator.SetToolTip(buttonClose, "Anuluj");
            buttonClose.MouseEnter          += buttonClose_MouseEnter;
            buttonClose.MouseLeave          += buttonClose_MouseLeave;
            buttonClose.MouseLeftButtonDown += buttonClose_MouseLeftButtonDown;


            if (isOnlyEditMode)
            {
                buttonSaveEditActivity.Content = "Zmień";
                nameEditActivity.Text          = namesActivity[index];
            }
            else
            {
                footerActivity.Add(ButtonCreator.CreateButton(contentCanvas, "Nowa aktywność", 120, 28, 12, Canvas.GetLeft(footerActivity[footerActivity.Count - 1]) + 120, 320,
                                                              Color.FromArgb(255, 55, 55, 55), Color.FromArgb(255, 255, 255, 255), 1));
                UpdateActivityFooter(footerActivity.Count - 1);
                Restart();
            }
        }
Exemplo n.º 26
0
        private void selectNonTitleApplication_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (highlightRect != null)
            {
                nonTitleApplicationCanvas.Children.Remove(highlightRect);
            }

            Point relativePoint = (sender as Label).TransformToAncestor(nonTitleApplicationCanvas).Transform(new Point(0, 0));

            highlightRect = ButtonCreator.CreateButton(nonTitleApplicationCanvas, "", 250, 29, 12, relativePoint.X, relativePoint.Y,
                                                       Color.FromArgb(80, 0, 250, 0), Color.FromArgb(0, 0, 0, 0));
            highlightRect.Background           = new SolidColorBrush(Color.FromArgb(80, 0, 250, 0));
            highlightRect.MouseLeftButtonDown += highlightRect_MouseLeftButtonDown;
            idAddNewTitleApplication           = Convert.ToInt32((sender as Label).Name.Replace("ID_", string.Empty));
            nameApplicationToChange.Visibility = Visibility.Visible;
            buttonSaveNewName.Visibility       = Visibility.Visible;
        }
Exemplo n.º 27
0
        private void CreateCanvasMembershipWithElements()
        {
            Canvas canvasMembership = CanvasCreator.CreateCanvas(MainCanvasCategory, 290, 380, Color.FromArgb(155, 4, 0, 35), 15, 15);

            ImageCreator.CreateImage(canvasMembership, 60, 60, 40, 40, "Pictures/MembershipImages.png");
            new MyLabel(canvasMembership, "Przynależność", 250, 40, 20, 60, 60, Color.FromArgb(255, 255, 255, 255),
                        Color.FromArgb(0, 255, 255, 255));
            MyRectangle r0 = new MyRectangle(canvasMembership, 250, 1, Color.FromArgb(40, 255, 255, 255), 20, 140);


            // przyłącz aplikacje ----------------------------------------------------------------------------------------------
            notJoinedApplications = new MyLabel(canvasMembership, "0", 60, 38, 18, 20, 200, Color.FromArgb(255, 125, 255, 0), Color.FromArgb(255, 255, 255, 255), 0);
            Label buttonJoinApplication = ButtonCreator.CreateButton(canvasMembership, "     Przyłącz Aplikacje", 225, 38, 16, 30, 200,
                                                                     Color.FromArgb(255, 255, 255, 255), Color.FromArgb(255, 255, 255, 255), 0);

            buttonJoinApplication.MouseEnter          += buttonJoinApplication_MouseEnter;
            buttonJoinApplication.MouseLeave          += buttonJoinApplication_MouseLeave;
            buttonJoinApplication.MouseLeftButtonDown += buttonJoinApplication_MouseLeftButtonDown;
            MyRectangle r = new MyRectangle(canvasMembership, 200, 1, Color.FromArgb(100, 255, 255, 255), 40, 237);

            //-----------------------------------------------------------------------------------------------------------------

            // przegląd grup
            numberGroups = new MyLabel(canvasMembership, "0", 50, 38, 18, 30, 237, Color.FromArgb(255, 255, 255, 255), Color.FromArgb(255, 255, 255, 255), 0);
            Label buttonShowGroups = ButtonCreator.CreateButton(canvasMembership, "     Przegląd Grup      ", 225, 38, 16, 30, 237,
                                                                Color.FromArgb(255, 255, 255, 255), Color.FromArgb(255, 255, 255, 255), 0);

            buttonShowGroups.MouseEnter          += buttonShowGroups_MouseEnter;
            buttonShowGroups.MouseLeave          += buttonShowGroups_MouseLeave;
            buttonShowGroups.MouseLeftButtonDown += buttonShowGroups_MouseLeftButtonDown;
            MyRectangle r2 = new MyRectangle(canvasMembership, 200, 1, Color.FromArgb(100, 255, 255, 255), 40, 275);

            //------------------------------------------------------------------------------------------------------------------


            // historia aktywności
            numberOfConfiguredGroups = new MyLabel(canvasMembership, "0", 50, 38, 18, 30, 275, Color.FromArgb(255, 255, 255, 255), Color.FromArgb(255, 255, 255, 255), 0);
            Label buttonConfigurationGroups = ButtonCreator.CreateButton(canvasMembership, "     Konfiguracje Grup", 225, 38, 16, 30, 275,
                                                                         Color.FromArgb(255, 255, 255, 255), Color.FromArgb(255, 255, 255, 255), 0);

            buttonConfigurationGroups.MouseEnter          += buttonConfigurationGroups_MouseEnter;
            buttonConfigurationGroups.MouseLeave          += buttonConfigurationGroups_MouseLeave;
            buttonConfigurationGroups.MouseLeftButtonDown += buttonConfigurationGroups_MouseLeftButtonDown;
            MyRectangle r3 = new MyRectangle(canvasMembership, 200, 1, Color.FromArgb(100, 255, 255, 255), 40, 312);
            //------------------------------------------------------------------------------------------------------------------
        }
Exemplo n.º 28
0
        private void CreateCanvasActivityWithElements()
        {
            Canvas canvasActivity = CanvasCreator.CreateCanvas(MainCanvasCategory, 290, 380, Color.FromArgb(155, 4, 0, 35), 320, 15);

            ImageCreator.CreateImage(canvasActivity, 60, 60, 40, 40, "Pictures/ActivityImages.png");
            new MyLabel(canvasActivity, "Aktywność", 250, 40, 20, 60, 60, Color.FromArgb(255, 255, 255, 255),
                        Color.FromArgb(0, 255, 255, 255));
            MyRectangle r0 = new MyRectangle(canvasActivity, 250, 1, Color.FromArgb(40, 255, 255, 255), 20, 140);


            // przypisz aktywności----------------------------------------------------------------------------------------------
            notAssignedApplications = new MyLabel(canvasActivity, "0", 60, 38, 18, 20, 200, Color.FromArgb(255, 125, 255, 0), Color.FromArgb(255, 255, 255, 255), 0);
            Label buttonAssignActivity = ButtonCreator.CreateButton(canvasActivity, "     Przypisz Aktywności", 225, 38, 16, 30, 200,
                                                                    Color.FromArgb(255, 255, 255, 255), Color.FromArgb(255, 255, 255, 255), 0);

            buttonAssignActivity.MouseEnter          += buttonAssignActivity_MouseEnter;
            buttonAssignActivity.MouseLeave          += buttonAssignActivity_MouseLeave;
            buttonAssignActivity.MouseLeftButtonDown += buttonAssignActivity_MouseLeftButtonDown;
            MyRectangle r = new MyRectangle(canvasActivity, 200, 1, Color.FromArgb(100, 255, 255, 255), 40, 237);

            //-----------------------------------------------------------------------------------------------------------------

            // przegląd aktywności
            numberActivity = new MyLabel(canvasActivity, "0", 50, 38, 18, 30, 237, Color.FromArgb(255, 255, 255, 255), Color.FromArgb(255, 255, 255, 255), 0);
            Label buttonShowActivity = ButtonCreator.CreateButton(canvasActivity, "     Przegląd Aktywności", 225, 38, 16, 30, 237,
                                                                  Color.FromArgb(255, 255, 255, 255), Color.FromArgb(255, 255, 255, 255), 0);

            buttonShowActivity.MouseEnter          += buttonShowActivity_MouseEnter;
            buttonShowActivity.MouseLeave          += buttonShowActivity_MouseLeave;
            buttonShowActivity.MouseLeftButtonDown += buttonShowActivity_MouseLeftButtonDown;
            MyRectangle r2 = new MyRectangle(canvasActivity, 200, 1, Color.FromArgb(100, 255, 255, 255), 40, 275);

            //------------------------------------------------------------------------------------------------------------------

            // historia aktywności
            daysHistoryActivity = new MyLabel(canvasActivity, "0", 50, 38, 18, 30, 275, Color.FromArgb(255, 255, 255, 255), Color.FromArgb(255, 255, 255, 255), 0);
            Label buttonHistoryActivity = ButtonCreator.CreateButton(canvasActivity, "     Historia Aktywności", 225, 38, 16, 30, 275,
                                                                     Color.FromArgb(255, 255, 255, 255), Color.FromArgb(255, 255, 255, 255), 0);

            buttonHistoryActivity.MouseEnter          += buttonHistoryActivity_MouseEnter;
            buttonHistoryActivity.MouseLeave          += buttonHistoryActivity_MouseLeave;
            buttonHistoryActivity.MouseLeftButtonDown += buttonHistoryActivity_MouseLeftButtonDown;
            MyRectangle r3 = new MyRectangle(canvasActivity, 200, 1, Color.FromArgb(100, 255, 255, 255), 40, 312);
            //------------------------------------------------------------------------------------------------------------------
        }
Exemplo n.º 29
0
 static void DrawBlueButtons()
 {
     if (Data.mode == 0 || (Data.mode == 1 && DataShop.shopMode == 1 && DataShop.canDisablePurchasedBlueprints))
     {
         profileImages.Clear();
         for (int profileIndex = 0; profileIndex < Data.profileCount; profileIndex++)
         {
             profileImages.Add(new List <Image>());
             GameObject button = ButtonCreator.SpawnBlueButton(rootTransform.gameObject, new Vector2(1, 1), new Vector2(UIConfig.blueButtonWidth, UIConfig.blueButtonHeight), "Profile: " + profileIndex.ToString(), TMPro.TextAlignmentOptions.Center, profileImages[profileIndex]);
             button.GetComponent <RectTransform>().localPosition = new Vector3(rootTransform.rect.width - UIConfig.offsetHorizontal - (UIConfig.blueButtonWidth + UIConfig.spacingHorizontal) * (Data.profileCount - 1 - profileIndex), -UIConfig.offsetVertical, 0);
             int profile = profileIndex;
             button.GetComponent <RoR2.UI.HGButton>().onClick.AddListener(() => {
                 Data.SetProfile(profile);
             });
             shopInterfaces.Add(button);
         }
     }
 }
Exemplo n.º 30
0
        private void SetConfigurationButton()
        {
            chooseGroupCanvas = new Canvas()
            {
                Width = 200, Height = 126
            };
            ScrollViewer sv = ScrollViewerCreator.CreateScrollViewer(addConfigurationCanvas, 200, 126, 20, 60, chooseGroupCanvas);

            sv.Background = new SolidColorBrush(Color.FromArgb(255, 35, 45, 100));

            chooseGroup = ButtonCreator.CreateButton(addConfigurationCanvas, "Wybierz grupę", 200, 30, 14, 20, 20,
                                                     Color.FromArgb(255, 255, 255, 255), Color.FromArgb(255, 155, 155, 155));
            chooseGroup.Background           = new SolidColorBrush(Color.FromArgb(50, 0, 125, 255));
            chooseGroup.MouseEnter          += buttonContent_MouseEnter;
            chooseGroup.MouseLeave          += buttonContent_MouseLeave;
            chooseGroup.MouseLeftButtonDown += buttonOpenChooseGroup;


            new MyLabel(addConfigurationCanvas, "x", 30, 50, 24, 573, 356, Color.FromArgb(255, 170, 170, 170),
                        Color.FromArgb(255, 70, 70, 70), 0);

            Label buttonExit = ButtonCreator.CreateButton(addConfigurationCanvas, "", 30, 30, 14, 573, 366,
                                                          Color.FromArgb(0, 155, 155, 155), Color.FromArgb(255, 155, 155, 155), 1);

            buttonExit.Background           = new SolidColorBrush(Color.FromArgb(0, 215, 215, 215));
            buttonExit.MouseEnter          += buttonExit_MouseEnter;
            buttonExit.MouseLeave          += buttonExit_MouseLeave;
            buttonExit.MouseLeftButtonDown += buttonExitConfigure_MouseLeftButtonDown;
            ButtonCreator.SetToolTip(buttonExit, "Zamknij okno");

            MyRectangle background = new MyRectangle(addConfigurationCanvas, 530, 140, Color.FromArgb(0, 244, 244, 255), 20, 200);

            background.SetFillColor(Color.FromArgb(255, 35, 45, 100));
            new MyLabel(addConfigurationCanvas, "Filtr", 50, 30, 14, 20, 209, Color.FromArgb(255, 255, 255, 255),
                        Color.FromArgb(255, 70, 70, 70));
            CreateCheckBox();
            CreateLabelWithInformation();
            CreateAddFilterButton();
            CreateAddFilterAccept();
            CreateApplyFilterButton();
            CreateDeleteApplicationWithFilterButton();
            CreateSaveDeleteConfigureButton();
        }