コード例 #1
0
ファイル: Global.cs プロジェクト: znl1087/spizdil_krosy
        public static void Init()
        {
            Version version = Assembly.GetEntryAssembly().GetName().Version;

            object[] objArray1 = new object[] { "v", version.Major, ".", version.Revision };
            VERSION   = string.Concat(objArray1);
            HddSerial = EveAIO.Helpers.GetHardDiskSerialNo();
            if (HddSerial.Length > 0x10)
            {
                HddSerial = HddSerial.Substring(0, 0x10);
            }
            while (HddSerial.Length < 0x10)
            {
                HddSerial = HddSerial + "A";
            }
            EncryptorAes.Key = HddSerial;
            Machine_name     = Environment.UserName;
            EveAIO.Helpers.LoadSettings();
            ViewDashboard     = new DashboardView();
            ViewProfiles      = new ProfilesView();
            ViewLog           = new LogView();
            ViewCaptcha       = new CaptchaView();
            ViewSuccess       = new SuccessView();
            ViewProxy         = new ProxyView();
            ViewNotifications = new NotificationsView();
            ViewSettings      = new SettingsView();
            ViewTools         = new ToolsView();
            CAPTCHA_QUEUE.CollectionChanged += new NotifyCollectionChangedEventHandler(Global.CAPTCHA_QUEUE_CollectionChanged);
            CLIENT = new Client(null, null, false);
            CLIENT.SetDesktopAgent();
            CLIENT.Session.DefaultRequestHeaders.TryAddWithoutValidation("Upgrade-Insecure-Requests", "1");
            CLIENT.Session.DefaultRequestHeaders.TryAddWithoutValidation("Accept-Language", "en-GB, en-US; q=0.9, en; q=0.8");
            CLIENT.Session.DefaultRequestHeaders.TryAddWithoutValidation("Connection", "keep-alive");
        }
コード例 #2
0
        public void Run()
        {
            configuration   = new Configuration();
            dialogContainer = new DialogContainer();

            statistics = new Statistics(configuration);
            statistics.ReportSessionStart();

            toolsView = new ToolsView(dialogContainer, statistics);

            int storedGameLevel;

            if (Int32.TryParse(configuration.GetValue(GameLevelConfigurationKey), out storedGameLevel))
            {
                gameLevel = storedGameLevel;
            }
            else
            {
                gameLevel = DefaultLevel;
                firstTime = true;
            }

            Document.Body.AppendChild(toolsView.HtmlElement);
            Document.Body.AppendChild(dialogContainer.HtmlElement);

            Window.AddEventListener("hashchange", e => OnHashChanged());
            Window.AddEventListener("resize", e => UpdateLayout());
            Window.AddEventListener("unload", e => statistics.ReportSessionEnd());

            CreateInitialGame();
        }
コード例 #3
0
        /// <inheritdoc/>
        public override IDock CreateDefaultLayout()
        {
            // Dashboard

            var dashboardView = new DashboardView
            {
                Dock   = "",
                Width  = double.NaN,
                Height = double.NaN,
                Title  = "Dashboard"
            };

            // Page

            var pageView = new PageView
            {
                Dock   = "",
                Width  = double.NaN,
                Height = double.NaN,
                Title  = "Page"
            };

            // Left / Top

            var projectView = new ProjectView
            {
                Dock   = "",
                Width  = double.NaN,
                Height = double.NaN,
                Title  = "Project"
            };

            var optionsView = new OptionsView
            {
                Dock   = "",
                Width  = 200,
                Height = 200,
                Title  = "Options"
            };

            var imagesView = new ImagesView
            {
                Dock   = "",
                Width  = double.NaN,
                Height = double.NaN,
                Title  = "Images"
            };

            // Left / Bottom

            var groupsView = new GroupsView
            {
                Dock   = "",
                Width  = double.NaN,
                Height = double.NaN,
                Title  = "Groups"
            };

            var databasesView = new DatabasesView
            {
                Dock   = "",
                Width  = double.NaN,
                Height = double.NaN,
                Title  = "Databases"
            };

            // Right / Top

            var stylesView = new StylesView
            {
                Dock   = "",
                Width  = double.NaN,
                Height = double.NaN,
                Title  = "Styles"
            };

            var templatesView = new TemplatesView
            {
                Dock   = "",
                Width  = double.NaN,
                Height = double.NaN,
                Title  = "Templates"
            };

            var containerView = new ContainerView
            {
                Dock   = "",
                Width  = double.NaN,
                Height = double.NaN,
                Title  = "Container"
            };

            var zoomView = new ZoomView
            {
                Dock   = "",
                Width  = double.NaN,
                Height = double.NaN,
                Title  = "Zoom"
            };

            // Right / Bottom

            var toolsView = new ToolsView
            {
                Dock   = "",
                Width  = double.NaN,
                Height = double.NaN,
                Title  = "Tools"
            };

            var shapeView = new ShapeView
            {
                Dock   = "",
                Width  = double.NaN,
                Height = double.NaN,
                Title  = "Shape"
            };

            var dataView = new DataView
            {
                Dock   = "",
                Width  = double.NaN,
                Height = double.NaN,
                Title  = "Data"
            };

            var styleView = new StyleView
            {
                Dock   = "",
                Width  = double.NaN,
                Height = double.NaN,
                Title  = "Style"
            };

            var templateView = new TemplateView
            {
                Dock   = "",
                Width  = double.NaN,
                Height = double.NaN,
                Title  = "Template"
            };

            // Left

            var leftPane = new DockLayout
            {
                Dock        = "Left",
                Width       = 200,
                Height      = double.NaN,
                Title       = "EditorLeft",
                CurrentView = null,
                Views       = new ObservableCollection <IDock>
                {
                    new DockStrip
                    {
                        Dock        = "Top",
                        Width       = double.NaN,
                        Height      = 340,
                        Title       = "EditorLeftTop",
                        CurrentView = projectView,
                        Views       = new ObservableCollection <IDock>
                        {
                            projectView,
                            optionsView,
                            imagesView
                        }
                    },
                    new DockSplitter()
                    {
                        Dock = "Top", Title = "LeftTopSplitter"
                    },
                    new DockStrip
                    {
                        Dock        = "Bottom",
                        Width       = double.NaN,
                        Height      = double.NaN,
                        Title       = "EditorLeftBottom",
                        CurrentView = groupsView,
                        Views       = new ObservableCollection <IDock>
                        {
                            groupsView,
                            databasesView
                        }
                    }
                }
            };

            // Right

            var rightPane = new DockLayout
            {
                Dock        = "Right",
                Width       = 240,
                Height      = double.NaN,
                Title       = "EditorRight",
                CurrentView = null,
                Views       = new ObservableCollection <IDock>
                {
                    new DockStrip
                    {
                        Dock        = "Top",
                        Width       = double.NaN,
                        Height      = 340,
                        Title       = "EditorRightTop",
                        CurrentView = stylesView,
                        Views       = new ObservableCollection <IDock>
                        {
                            stylesView,
                            templatesView,
                            containerView,
                            zoomView
                        }
                    },
                    new DockSplitter()
                    {
                        Dock = "Top", Title = "RightTopSplitter"
                    },
                    new DockStrip
                    {
                        Dock        = "Bottom",
                        Width       = double.NaN,
                        Height      = double.NaN,
                        Title       = "EditorRightBottom",
                        CurrentView = toolsView,
                        Views       = new ObservableCollection <IDock>
                        {
                            toolsView,
                            shapeView,
                            dataView,
                            styleView,
                            templateView
                        }
                    }
                }
            };

            // Editor

            var editorLayout = new DockLayout
            {
                Dock        = "",
                Width       = double.NaN,
                Height      = double.NaN,
                Title       = "EditorLayout",
                CurrentView = null,
                Views       = new ObservableCollection <IDock>
                {
                    leftPane,
                    new DockSplitter()
                    {
                        Dock = "Left", Title = "LeftSplitter"
                    },
                    rightPane,
                    new DockSplitter()
                    {
                        Dock = "Right", Title = "RightSplitter"
                    },
                    pageView
                }
            };

            var editorView = new EditorView
            {
                Dock        = "",
                Width       = double.NaN,
                Height      = double.NaN,
                Title       = "Editor",
                CurrentView = editorLayout,
                Views       = new ObservableCollection <IDock>
                {
                    editorLayout
                }
            };

            // About

            var aboutView = new AboutView
            {
                Dock   = "",
                Width  = double.NaN,
                Height = double.NaN,
                Title  = "About"
            };

            // Browser

            var browserView = new BrowserView
            {
                Dock   = "",
                Width  = double.NaN,
                Height = double.NaN,
                Title  = "Browser"
            };

            // Document

            var documentView = new DocumentView
            {
                Dock   = "",
                Width  = double.NaN,
                Height = double.NaN,
                Title  = "Document"
            };

            // Main

            var layout = new DockRoot
            {
                Dock        = "",
                Width       = double.NaN,
                Height      = double.NaN,
                CurrentView = dashboardView,
                Views       = new ObservableCollection <IDock>
                {
                    dashboardView,
                    editorView,
                    aboutView,
                    browserView,
                    documentView
                }
            };

            return(layout);
        }