コード例 #1
0
ファイル: FrmMain.cs プロジェクト: smfichadiya/grocy-desktop
        private async void ToolStripMenuItem_UpdateBarcodeBuddy_Click(object sender, EventArgs e)
        {
            await GrocyDesktopDependencyManager.UpdateEmbeddedBarcodeBuddyRelease(this);

            this.BarcodeBuddyManager.Setup(this.GrocyManager.LocalUrl);
            this.BarcodeBuddyBrowser.Load(this.BarcodeBuddyManager.LocalUrl);
        }
コード例 #2
0
ファイル: FrmMain.cs プロジェクト: smfichadiya/grocy-desktop
        private async void FrmMain_Shown(object sender, EventArgs e)
        {
            await GrocyDesktopDependencyManager.UnpackIncludedDependenciesIfNeeded(this.UserSettings, this);

            this.SetupGrocy();
            if (this.UserSettings.EnableBarcodeBuddyIntegration)
            {
                this.SetupBarcodeBuddy();
            }
            this.UserDataSyncRestore();
            this.SetupPhpFastCgiServer();
            this.SetupNginx();
            this.SetupCef();

            this.ToolStripMenuItem_EnableBarcodeBuddy.Checked   = this.UserSettings.EnableBarcodeBuddyIntegration;
            this.ToolStripMenuItem_EnableExternalAccess.Checked = this.UserSettings.EnableExternalWebserverAccess;
            this.ToolStripMenuItem_EnableUserDataSync.Checked   = this.UserSettings.EnableUserDataSync;

            if (this.UserSettings.EnableBarcodeBuddyIntegration)
            {
                this.ToolStripStatusLabel_ExternalAccessInfo.Text = this.ResourceManager.GetString("STRING_GrocyAndBarcodeBuddyExternalAccessInfo.Text")
                                                                    .Replace("%1$s", this.GrocyManager.HostnameUrl)
                                                                    .Replace("%2$s", this.GrocyManager.IpUrl)
                                                                    .Replace("%3$s", this.BarcodeBuddyManager.HostnameUrl)
                                                                    .Replace("%4$s", this.BarcodeBuddyManager.IpUrl);
            }
            else
            {
                this.ToolStripStatusLabel_ExternalAccessInfo.Text = this.ResourceManager.GetString("STRING_GrocyExternalAccessInfo.Text")
                                                                    .Replace("%1$s", this.GrocyManager.HostnameUrl)
                                                                    .Replace("%2$s", this.GrocyManager.IpUrl);
            }
        }
コード例 #3
0
        private async void FrmMain_Shown(object sender, EventArgs e)
        {
            await GrocyDesktopDependencyManager.UnpackIncludedDependenciesIfNeeded(this);

            this.SetupPhpServer();
            this.SetupGrocy();
            this.SetupCef();
        }
コード例 #4
0
        private async void updateToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.PhpServer.StopServer();
            await GrocyDesktopDependencyManager.UpdateEmbeddedGrocyRelease(this);

            this.PhpServer.StartServer();
            this.GrocyEnvironmentManager.Setup(this.PhpServer.Url);
            this.Browser.Load(this.PhpServer.Url);
        }
コード例 #5
0
        private async void ToolStripMenuItem_UpdateBarcodeBuddy_Click(object sender, EventArgs e)
        {
            this.BarcodeBuddyPhpServer.StopServer();
            Thread.Sleep(2000);             // Just give php.exe some time to stop...
            await GrocyDesktopDependencyManager.UpdateEmbeddedBarcodeBuddyRelease(this);

            this.BarcodeBuddyPhpServer.StartServer();
            this.BarcodeBuddyEnvironmentManager.Setup(this.BarcodeBuddyPhpServer.Url);
            this.BarcodeBuddyBrowser.Load(this.BarcodeBuddyPhpServer.Url);
        }
コード例 #6
0
        private async void FrmMain_Shown(object sender, EventArgs e)
        {
            await GrocyDesktopDependencyManager.UnpackIncludedDependenciesIfNeeded(this.UserSettings, this);

            this.SetupGrocy();
            if (this.UserSettings.EnableBarcodeBuddyIntegration)
            {
                this.SetupBarcodeBuddy();
            }
            this.SetupCef();

            this.ToolStripMenuItem_EnableBarcodeBuddy.Checked = this.UserSettings.EnableBarcodeBuddyIntegration;
        }