Beispiel #1
0
        private void Window_Closed(object sender, EventArgs e)
        {
            Single = null;
            if (RecordScreenHandler != null)
            {
                RecordScreenHandler.Stop();
                RecordScreenHandler.Save();
                EarthViewCtrl.render.Handlers.Remove(RecordScreenHandler);
                oepAnimationPathExtension ape = null;
                foreach (var es in Project.CurrentMap.Extensions)
                {
                    ape = es as oepAnimationPathExtension;
                    if (ape != null)
                    {
                        break;
                    }
                }

                if (ape == null)
                {
                    ape = new oepAnimationPathExtension();
                    Project.CurrentMap.Extensions.Add(ape);
                }

                ape.AnimationPaths.Add(new oepAnimationPath()
                {
                    Name = tbName.Text, Url = tbName.Tag as string
                });
            }
        }
        private void btnok_Click(object sender, RoutedEventArgs e)
        {
            if (CurrentAnimationPath == null)
            {
                return;
            }

            string rcdurl = tbName.Tag as string;

            if (File.Exists(rcdurl))
            {
                string msg = this.Resources["pathexisterr"] as string;
                MessageBox.Show(msg);
                return;
            }
            CurrentAnimationPath.Url  = rcdurl;
            CurrentAnimationPath.Name = tbName.Text;
            CurrentAnimationPath.Save();
            Single = null;

            oepAnimationPathExtension ape = null;

            foreach (var es in Project.CurrentMap.Extensions)
            {
                ape = es as oepAnimationPathExtension;
                if (ape != null)
                {
                    break;
                }
            }

            if (ape == null)
            {
                ape = new oepAnimationPathExtension();
                Project.CurrentMap.Extensions.Add(ape);
            }

            ape.AnimationPaths.Add(CurrentAnimationPath);

            this.Close();
        }