private void AutoReservationTabControl_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
        {
            if (e.OriginalSource == AutoReservationTabControl)
            {
                switch (AutoReservationTabControl.SelectedIndex)
                {
                case 0:
                {
                    Avm.Loading = true;
                    Avm.LoadAutoData();
                    break;
                }

                case 1:
                {
                    Kvm.Loading = true;
                    Kvm.LoadKundeData();
                    break;
                }

                case 2:
                {
                    Rvm.Loading = true;
                    Rvm.LoadReservationData();
                    break;
                }
                }
            }
        }
示例#2
0
        public void OpenProject(string path)
        {
            Update(Utils.Update((EditorState s, JObject c) =>
                                s.WithDialog(null, c).WithWorkspace(Workspace.Create(path), c)
                                ));

            if (_host != null)
            {
                _host.Dispose();
            }

            _host             = new Host(path);
            _host.Connected  += HostConnected;
            _host.References += HostReferences;
            _host.Start(Kvm.GetRuntime("default"));
        }
示例#3
0
文件: Program.cs 项目: shahid-pk/Runt
        static async Task Run(string[] args)
        {
            if (!Kvm.HasAlias("default"))
            {
                await Kvm.Upgrade();
            }

            var kreBin  = Kvm.GetRuntime("default");
            var appData = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Runt");

            if (!Directory.Exists(appData))
            {
                Directory.CreateDirectory(appData);
                Directory.CreateDirectory(Path.Combine(appData, "Runt.Bootstrap"));

                var globalContent = new JObject(
                    new JProperty("sources", new JArray())
                    );
                File.WriteAllText(Path.Combine(appData, "global.json"), globalContent.ToString(Formatting.Indented));
            }


            var projectContent = new JObject(
                new JProperty("name", "Runt.Bootstrap"),
                new JProperty("dependencies", new JObject(
                                  new JProperty("Runt.Web", new JValue("0.1-*"))
                                  )),
                new JProperty("commands", new JObject(
                                  new JProperty("web", new JValue("Microsoft.AspNet.Hosting server=Microsoft.AspNet.Server.WebListener server.urls=http://localhost:5002"))
                                  ))
                );

            File.WriteAllText(Path.Combine(appData, "NuGet.Config"), @"
<?xml version=""1.0"" encoding=""utf-8""?>
<configuration>
  <packageSources>
    <add key=""Xunit.KRunner.AppVeyor"" value=""https://ci.appveyor.com/nuget/xunit-krunner-appveyor-nc1iiur8kt0q"" />
    <add key=""XUnit.KRunner"" value=""https://ci.appveyor.com/nuget/testing-41kgpkx6hvln"" />
    <add key=""AspNetVNext"" value=""https://www.myget.org/F/aspnetvnext/api/v2"" />
    <add key=""NuGet.org"" value=""https://nuget.org/api/v2/"" />
  </packageSources>
</configuration>");
            File.WriteAllText(Path.Combine(appData, "Runt.Bootstrap", "project.json"), projectContent.ToString(Formatting.Indented));

            AssertOk(await Update(kreBin, Path.Combine(appData, "Runt.Bootstrap")));
            Run(kreBin, Path.Combine(appData, "Runt.Bootstrap"));
        }