Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
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.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);
            }
        }
Exemplo n.º 3
0
        private async void FrmMain_Shown(object sender, EventArgs e)
        {
            await GrocyDesktopDependencyManager.UnpackIncludedDependenciesIfNeeded(this);

            this.SetupPhpServer();
            this.SetupGrocy();
            this.SetupCef();
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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;
        }