Exemplo n.º 1
0
        public PatcherModule()
        {
            if (Global.Yse == null)
            {
                return;
            }

            sound   = Global.Yse.NewSound();
            patcher = Global.Yse.NewPatcher();
            patcher.Create(1);
            sound.Create(patcher);
        }
Exemplo n.º 2
0
        public HelpWindow()
        {
            InitializeComponent();

            sound   = Global.YseObj.NewSound();
            patcher = Global.YseObj.NewPatcher();
            patcher.Create(1);

            yap.Handle    = new YapHandler(patcher);
            yap.Focusable = true;
            yap.Focus();
            yap.Init();

            sound.Create(patcher);
            sound.Play();

            Title = "Yap Help";

            string path = "";

#if DEBUG
            path = System.IO.Directory.GetCurrentDirectory();
            DirectoryInfo parent = System.IO.Directory.GetParent(path);
            parent = parent.Parent.Parent.Parent;
            path   = parent.FullName;
            path   = System.IO.Path.Combine(path, "help");
#else
            path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            path = System.IO.Path.Combine(path, "help");
#endif

            if (Directory.Exists(path))
            {
                foreach (string s in Directory.GetDirectories(path))
                {
                    TreeViewItem item = new TreeViewItem();
                    item.Header     = s.Substring(s.LastIndexOf("\\") + 1);
                    item.Tag        = s;
                    item.FontWeight = FontWeights.Normal;
                    item.Items.Add(dummyNode);
                    item.Expanded += new RoutedEventHandler(folderExpanded);
                    helpfiles.Items.Add(item);
                }
            }
        }