Beispiel #1
0
        public static sFolder Decrypt(sFile item, int blockSize, IPluginHost pluginHost)
        {
            sFolder unpacked = new sFolder();
            unpacked.files = new List<sFile>();

            byte[] data = File.ReadAllBytes(item.path);
            int numBlocks = data.Length / blockSize;

            for (int i = 0; i < numBlocks; i++)
            {
                byte[] block = new byte[blockSize];
                Array.Copy(data, i * blockSize, block, 0, blockSize);
                Decrypt(ref block);
                Array.Copy(block, 0, data, i * blockSize, blockSize);
            }

            string fileout = pluginHost.Get_TempFile();
            File.WriteAllBytes(fileout, data);

            sFile newItem = new sFile();
            newItem.path = fileout;
            newItem.offset = 0;
            newItem.name = item.name;
            newItem.size = (uint)data.Length;
            unpacked.files.Add(newItem);

            return unpacked;
        }
Beispiel #2
0
 public override bool Initialise(IPluginHost host)
 {
     // TODO: Implement this correctly
     Host = host;
     this.Log().Debug("Initialised plugin. Plugin version = {0}, Host version = {1}", Version, Host.Version);
     return true;
 }
Beispiel #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FlashRecovery" /> class.
        /// </summary>
        /// <param name="host">The host.</param>
        public FlashRecovery( IPluginHost host )
            : base(host)
        {
            this.PluginHost = host;

              CommandRunner.Instance.DeviceStateChanged += new EventHandler<DeviceEventArgs> ( CommandRunner_DeviceStateChanged );
        }
Beispiel #4
0
        public MyView(IPluginHost myHost, IPlugin myPlugin, Webservice.IWebserviceClient aWebserviceClient, IPlugin aWebservicePlugin)
        {
            InitializeComponent();

            _aWebserviceClient = aWebserviceClient;
            _myHost = myHost;
            _myPlugin = myPlugin;
            _aStreamManagerAll = new StreamManager(aWebserviceClient);
            _aStreamManagerFavorites = new StreamManager(aWebserviceClient);
            _aWebservicePlugin = aWebservicePlugin;

            //Init Binding
            ICollectionView viewAll = CollectionViewSource.GetDefaultView(_aStreamManagerAll.GetStreams());
            new TextSearchFilter(viewAll, textBoxSearch);

            ICollectionView viewFavorites = CollectionViewSource.GetDefaultView(_aStreamManagerFavorites.GetStreams());
            new TextSearchFilter(viewFavorites, textBoxSearch);

            listView.DataContext = viewAll;
            Binding bindAll = new Binding();
            listView.SetBinding(System.Windows.Controls.ItemsControl.ItemsSourceProperty, bindAll);

            listViewFavorites.DataContext = viewFavorites;
            Binding bindFav = new Binding();
            listViewFavorites.SetBinding(System.Windows.Controls.ItemsControl.ItemsSourceProperty, bindFav);

            _aStreamManagerAll.Load(Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "\\Gamenoise\\streamsAll.xml");
            _aStreamManagerFavorites.Load(Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "\\Gamenoise\\streamsFavorite.xml");
        }
Beispiel #5
0
        public void Initialize(IPluginHost pluginHost, string gameCode)
        {
            this.pluginHost = pluginHost;
            this.gameCode = gameCode;

            pal_id = new List<int>();
            pal_id.Add(0x07);
            pal_id.Add(0xD7);
            pal_id.Add(0xDA);
            pal_id.Add(0xDC);
            pal_id.Add(0xDE);
            pal_id.Add(0xE0);
            pal_id.Add(0xE2);
            pal_id.Add(0xE4);
            pal_id.Add(0xE6);
            pal_id.Add(0xF0);
            pal_id.Add(0xF2);
            pal_id.Add(0xF4);
            pal_id.Add(0xFC);
            pal_id.Add(0xFF);
            pal_id.Add(0x104);
            pal_id.Add(0x108);
            pal_id.Add(0x10A);
            pal_id.Add(0x10D);
            pal_id.Add(0x10F);
            pal_id.Add(0x111);
            pal_id.Add(0x113);
            pal_id.Add(0x118);
        }
Beispiel #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Shell"/> class.
 /// </summary>
 /// <param name="host">The host.</param>
 public ApkExtension(IPluginHost host)
     : base(host)
 {
     if ( host != null ) {
         this.PluginHost.RegisterFileTypeIconHandler(".apk", this);
     }
 }
        public DX11RendererNode(IPluginHost host, IIOFactory iofactory,IHDEHost hdehost)
        {
            InitializeComponent();
            this.FHost = host;
            this.hde = hdehost;

            //this.hde.BeforeComponentModeChange += new ComponentModeEventHandler(hde_BeforeComponentModeChange);

            this.Resize += DX11RendererNode_Resize;
            this.Load += new EventHandler(DX11RendererNode_Load);
            this.Click += new EventHandler(DX11RendererNode_Click);
            this.MouseEnter += new EventHandler(DX11RendererNode_MouseEnter);
            this.MouseLeave += new EventHandler(DX11RendererNode_MouseLeave);
            this.LostFocus += new EventHandler(DX11RendererNode_LostFocus);
            this.MouseWheel += new System.Windows.Forms.MouseEventHandler(DX11RendererNode_MouseWheel);
            this.BackColor = Color.Black;
            Touchdown += OnTouchDownHandler;
            Touchup += OnTouchUpHandler;
            TouchMove += OnTouchMoveHandler;

            this.depthmanager = new DepthBufferManager(host,iofactory);

            ConfigAttribute bbAttr = new ConfigAttribute("Back Buffer Format");
            bbAttr.IsSingle = true;
            bbAttr.EnumName = DX11EnumFormatHelper.NullDeviceFormats.GetEnumName(FormatSupport.BackBufferCast);
            bbAttr.DefaultEnumEntry = DX11EnumFormatHelper.NullDeviceFormats.GetAllowedFormats(FormatSupport.BackBufferCast)[0];

            this.FCfgBackBufferFormat = iofactory.CreateDiffSpread<EnumEntry>(bbAttr);
            this.FCfgBackBufferFormat[0] = new EnumEntry(DX11EnumFormatHelper.NullDeviceFormats.GetEnumName(FormatSupport.BackBufferCast), 0);
        }
Beispiel #8
0
 public TextEditor(IPluginHost pluginHost, sFile file)
     : this()
 {
     this.pluginHost = pluginHost;
     this.id = file.id;
     this.txtText.Text = File.ReadAllText(file.path);
 }
Beispiel #9
0
        public static sFolder Unpack2(IPluginHost pluginHost, sFile file)
        {
            BinaryReader br = new BinaryReader(File.OpenRead(file.path));
            sFolder unpack = new sFolder();
            unpack.files = new List<sFile>();

            // Read offset table
            uint num_files = br.ReadUInt32() / 4;
            br.BaseStream.Position -= 4;
            for (int i = 0; i < num_files; i++)
            {
                sFile currFile = new sFile();
                currFile.name = file.name + i.ToString();
                if (i == 0)
                    currFile.name += ".ncer";
                else if (i == 1)
                    currFile.name += ".nanr";
                else if (i == 2)
                    currFile.name += ".ncgr";
                currFile.offset = br.ReadUInt32();
                currFile.path = file.path;

                if (i + 1 == num_files) // Last file
                    currFile.size = (uint)br.BaseStream.Length - currFile.offset;
                else
                    currFile.size = br.ReadUInt32() - currFile.offset;
                br.BaseStream.Position -= 4;

                unpack.files.Add(currFile);
            }

            br.Close();
            return unpack;
        }
Beispiel #10
0
        public TextureControl(IPluginHost pluginHost, sBTX0.Texture tex, uint texOffset, string filePath)
        {
            InitializeComponent();

            sBTX0 btx0 = new sBTX0();
            btx0.texture = tex;
            btx0.file = filePath;
            btx0.header.offset = new uint[1];
            btx0.header.offset[0] = texOffset;

            this.pluginHost = pluginHost;
            this.btx0 = btx0;
            ReadLanguage();

            for (int i = 0; i < btx0.texture.texInfo.num_objs; i++)
                listTextures.Items.Add(String.Format("{0}: {1}", i.ToString(), btx0.texture.texInfo.names[i]));
            for (int i = 0; i < btx0.texture.palInfo.num_objs; i++)
                listPalettes.Items.Add(String.Format("{0}: {1}", i.ToString(), btx0.texture.palInfo.names[i]));

            listTextures.SelectedIndex = 0;
            listPalettes.SelectedIndex = 0;

            listTextures.SelectedIndexChanged += new EventHandler(listTextures_SelectedIndexChanged);
            listPalettes.SelectedIndexChanged += new EventHandler(listPalettes_SelectedIndexChanged);

            UpdateTexture(0, 0);
        }
        /// <summary>
        /// Initializes the plugin using the specified KeePass host.
        /// </summary>
        /// <param name="host">The plugin host.</param>
        /// <returns></returns>
        public override bool Initialize(IPluginHost host)
        {
            Debug.Assert(host != null);
            if(host == null) return false;
            m_host = host;

            // Add a seperator and menu item to the 'Tools' menu
            ToolStripItemCollection tsMenu = m_host.MainWindow.ToolsMenu.DropDownItems;
            m_tsSeparator1 = new ToolStripSeparator();
            tsMenu.Add(m_tsSeparator1);
            menuDownloadFavicons = new ToolStripMenuItem();
            menuDownloadFavicons.Text = "Download Favicons for all entries";
            menuDownloadFavicons.Click += OnMenuDownloadFavicons;
            tsMenu.Add(menuDownloadFavicons);

            // Add a seperator and menu item to the group context menu
            ContextMenuStrip gcm = m_host.MainWindow.GroupContextMenu;
            m_tsSeparator2 = new ToolStripSeparator();
            gcm.Items.Add(m_tsSeparator2);
            menuDownloadGroupFavicons = new ToolStripMenuItem();
            menuDownloadGroupFavicons.Text = "Download Favicons";
            menuDownloadGroupFavicons.Click += OnMenuDownloadGroupFavicons;
            gcm.Items.Add(menuDownloadGroupFavicons);

            // Add a seperator and menu item to the entry context menu
            ContextMenuStrip ecm = m_host.MainWindow.EntryContextMenu;
            m_tsSeparator3 = new ToolStripSeparator();
            ecm.Items.Add(m_tsSeparator3);
            menuDownloadEntryFavicons = new ToolStripMenuItem();
            menuDownloadEntryFavicons.Text = "Download Favicons";
            menuDownloadEntryFavicons.Click += OnMenuDownloadEntryFavicons;
            ecm.Items.Add(menuDownloadEntryFavicons);

            return true; // Initialization successful
        }
 public override void Terminate()
 {
     _host.ColumnProviderPool.Remove(_columnProvider);
     _columnProvider.Terminate();
     _host = null;
     base.Terminate();
 }
Beispiel #13
0
 public Cpu(IPluginHost host)
 {
     Host = host;
     register = new ushort[8];
     PC = SP = EX = IA = 0;
     skipping = interruptQueueing = error = false;
 }
        public DX11CubeRendererNode(IPluginHost FHost, IIOFactory iofactory)
        {
            string ename = DX11EnumFormatHelper.NullDeviceFormats.GetEnumName(FormatSupport.RenderTarget);

            InputAttribute tattr = new InputAttribute("Target Format");
            tattr.IsSingle = true;
            tattr.EnumName = ename;
            tattr.DefaultEnumEntry = "R8G8B8A8_UNorm";

            this.FInFormat = iofactory.CreateDiffSpread<EnumEntry>(tattr);

            this.depthmanager = new DepthBufferManager(FHost, iofactory);

            this.lookats.Add(new Vector3(1.0f, 0.0f, 0.0f));
            this.lookats.Add(new Vector3(-1.0f, 0.0f, 0.0f));
            this.lookats.Add(new Vector3(0.0f, 1.0f, 0.0f));

            this.lookats.Add(new Vector3(0.0f, - 1.0f, 0.0f));
            this.lookats.Add(new Vector3(0.0f, 0.0f, 1.0f));
            this.lookats.Add(new Vector3(0.0f, 0.0f, -1.0f));

            this.upvectors.Add(new Vector3(0.0f, 1.0f, 0.0f));
            this.upvectors.Add(new Vector3(0.0f, 1.0f, 0.0f));
            this.upvectors.Add(new Vector3(0.0f, 0.0f, -1.0f));
            this.upvectors.Add(new Vector3(0.0f, 0.0f, 1.0f));
            this.upvectors.Add(new Vector3(0.0f, 1.0f, 0.0f));
            this.upvectors.Add(new Vector3(0.0f, 1.0f, 0.0f));
        }
Beispiel #15
0
        public static sFolder Unpack(string file, IPluginHost pluginHost)
        {
            BinaryReader br = new BinaryReader(File.OpenRead(file));
            sFolder unpacked = new sFolder();
            unpacked.files = new List<sFile>();

            uint num_files = (br.ReadUInt32() / 0x04) - 1;
            br.ReadUInt32(); // Pointer table
            for (int i = 0; i < num_files; i++)
            {
                uint startOffset = br.ReadUInt32();
                long currPos = br.BaseStream.Position;
                br.BaseStream.Position = startOffset;

                sFile newFile = new sFile();
                newFile.name = "File " + (i + 1).ToString("X") + ".bin";
                newFile.offset = startOffset + 4;
                newFile.path = file;
                newFile.size = br.ReadUInt32();

                br.BaseStream.Position = currPos;
                unpacked.files.Add(newFile);
            }

            br.Close();
            return unpacked;
        }
Beispiel #16
0
 public KeePassRPCService(IPluginHost host, string[] standardIconsBase64, KeePassRPCExt plugin)
 {
     KeePassRPCPlugin = plugin;
     PluginVersion = KeePassRPCExt.PluginVersion;
     this.host = host;
     _standardIconsBase64 = standardIconsBase64;
 }
Beispiel #17
0
        public iTXT(byte[] text, IPluginHost pluginHost, int id)
        {
            InitializeComponent();

            // TextBox parameter
            this.txtBox.Dock = DockStyle.Top;
            this.txtBox.Font = new Font(FontFamily.GenericMonospace, 11);
            this.txtBox.HideSelection = false;
            this.txtBox.Multiline = true;
            this.txtBox.WordWrap = this.checkWordWrap.Checked;
            this.txtBox.ScrollBars = ScrollBars.Both;
            this.txtBox.Size = new Size(510, 466);

            this.pluginHost = pluginHost;
            this.id = id;
            this.text = text;

            // TODO: Compare preamble with supported encodings.
            if ((text[0] == 0xFE && text[1] == 0xFF) || (text[0] == 0xFF && text[1] == 0xFE))
                comboEncod.SelectedIndex = 2;
            else if (BitConverter.ToUInt16(text, 0) == 0xBBEF)
                comboEncod.SelectedIndex = 4;
            else
                comboEncod.SelectedIndex = 1;

            ReadLanguage();
        }
        public ScreenRecordForm( IPluginHost pluginHost )
            : base(pluginHost)
        {
            this.StickyWindow = new DroidExplorer.UI.StickyWindow ( this );
            CommonResolutions = GetCommonResolutions ( );
            InitializeComponent ( );

            var defaultFile = "screenrecord_{0}_{1}.mp4".With ( this.PluginHost.Device, DateTime.Now.ToString ( "yyyy-MM-dd-hh" ) );
            this.location.Text = "/sdcard/{0}".With ( defaultFile );

            var resolution = new VideoSize ( PluginHost.CommandRunner.GetScreenResolution ( ) );
            var sizes = CommonResolutions.Concat ( new List<VideoSize> { resolution } ).OrderBy ( x => x.Size.Width ).Select ( x => x ).ToList ( );
            resolutionList.DataSource = sizes;
            resolutionList.DisplayMember = "Display";
            resolutionList.ValueMember = "Size";
            resolutionList.SelectedItem = resolution;

            rotateList.DataSource = GetRotateArgumentsList ( );
            rotateList.DisplayMember = "Display";
            rotateList.ValueMember = "Arguments";

            var bitrates = new List<BitRate> ( );

            for ( int i = 1; i < 25; i++ ) {
                bitrates.Add ( new BitRate ( i ) );
            }

            bitrateList.DataSource = bitrates;
            bitrateList.DisplayMember = "Display";
            bitrateList.ValueMember = "Value";
            bitrateList.SelectedItem = bitrates.Single ( x => x.Mbps == 4 );
            var ts = new TimeSpan ( 0, 0, 0, timeLimit.Value, 0 );
            displayTime.Text = ts.ToString ( );
        }
 public PluginManager(IPluginHost _host, String _pluginAppPath, String _configFiletype = "*.json")
 {
     Host = _host;
     PluginAppPath = _pluginAppPath;
     ConfigFiletype = _configFiletype;
     Plugins = LoadPlugins();
 }
Beispiel #20
0
 public DX11PreviewNode(IPluginHost host, IIOFactory iofactory)
 {
     this.ctrl = new Control();
      this.ctrl.Dock = DockStyle.Fill;
      this.ctrl.Resize += new EventHandler(ctrl_Resize);
      this.ctrl.BackColor = System.Drawing.Color.Black;
 }
Beispiel #21
0
        public BulletRopeShapeNode(IPluginHost host)
        {
            this.FHost = host;

            this.FHost.CreateValueInput("Fixed Edges", 2, null, TSliceMode.Dynamic, TPinVisibility.True, out this.FPinInFixed);
            this.FPinInFixed.SetSubType2D(0, 1, 1, 0, 0, false, true, false);
        }
        public override bool Initialize(IPluginHost host)
        {
            if(m_host != null) Terminate();
            if(host == null) return false;
            if(NativeLib.IsUnix()) return false;

            // #pragma warning disable 162
            // if(PwDefs.Version32 <= 0x02010500)
            // {
            //	MessageService.ShowWarning("IOProtocolExt",
            //		"This plugin requires KeePass 2.16 or higher.");
            //	return false;
            // }
            // #pragma warning restore 162

            m_host = host;
            m_host.TriggerSystem.RaisingEvent += this.OnEcasEvent;

            m_tsSep = new ToolStripSeparator();
            m_host.MainWindow.ToolsMenu.DropDownItems.Add(m_tsSep);

            m_tsOptions = new ToolStripMenuItem(IopDefs.ProductName + " Options...");
            m_tsOptions.Click += this.OnOptions;
            m_host.MainWindow.ToolsMenu.DropDownItems.Add(m_tsOptions);

            m_wrcWinScp = new WinScpWebRequestCreator();
            m_wrcWinScp.Register();

            return true;
        }
        public override bool Initialize(IPluginHost host)
        {
            Debug.Assert(host != null);
            if (host == null) return false;
            m_host = host;
            global_window_manager_window_added_handler = new EventHandler<GwmWindowEventArgs>(GlobalWindowManager_WindowAdded);
            GlobalWindowManager.WindowAdded += global_window_manager_window_added_handler;
            ToolStripItemCollection tsMenu = m_host.MainWindow.EntryContextMenu.Items;
            m_tsmi_set_template_parent = new ToolStripMenuItem();
            m_tsmi_set_template_parent.Text = "Set Template Parent";
            m_tsmi_set_template_parent.Click += m_tsmi_set_template_parent_Click;
            m_tsmi_set_template_parent.Image = Resources.Resources.B16x16_KOrganizer;
            tsMenu.Add(m_tsmi_set_template_parent);
            m_tsmi_copy_template_string = new ToolStripMenuItem();
            m_tsmi_copy_template_string.Text = "Copy Template String";
            m_tsmi_copy_template_string.Image = Resources.Resources.B16x16_KOrganizer;
            m_dynCustomStrings = new DynamicMenu(m_tsmi_copy_template_string);
            m_dynCustomStrings.MenuClick += m_dynCustomStrings_MenuClick;
            tsMenu.Add(m_tsmi_copy_template_string);

            entry_context_menu_opening_handler = new System.ComponentModel.CancelEventHandler(EntryContextMenu_Opening);
            m_host.MainWindow.EntryContextMenu.Opening += entry_context_menu_opening_handler;
            entry_templates_entry_creating_handler = new EventHandler<TemplateEntryEventArgs>(EntryTemplates_EntryCreating);
            EntryTemplates.EntryCreating += entry_templates_entry_creating_handler;

            return true;
        }
Beispiel #24
0
        public override bool Initialize(IPluginHost host)
        {
            var httpSupported = HttpListener.IsSupported;
            this.host = host;
            if (httpSupported)
            {
                try {
                    handlers.Add(Request.TEST_ASSOCIATE, TestAssociateHandler);
                    handlers.Add(Request.ASSOCIATE, AssociateHandler);
                    handlers.Add(Request.GET_LOGINS, GetLoginsHandler);
                    handlers.Add(Request.GET_LOGINS_COUNT, GetLoginsCountHandler);
                    handlers.Add(Request.GET_ALL_LOGINS, GetAllLoginsHandler);
                    handlers.Add(Request.SET_LOGIN, SetLoginHandler);

                    listener = new HttpListener();
                    listener.Prefixes.Add(HTTP_PREFIX + port + "/");
                    listener.Start();

                    httpThread = new Thread(new ThreadStart(Run));
                    httpThread.Start();
                } catch (HttpListenerException e) {
                    MessageBox.Show(host.MainWindow, "Unable to start HttpListener: " + e);
                }
            }
            else
            {
                MessageBox.Show(host.MainWindow, "The .NET HttpListener is not supported on your OS");
            }
            return httpSupported;
        }
        public DX11AbstractMeshNode(IPluginHost Host)
        {
            //assign host
            this.FHost = Host;

            this.SetInputs();
        }
Beispiel #26
0
        /// <summary>
        /// 初始化插件
        /// </summary>
        /// <param name="_app"></param>
        /// <returns></returns>
        public PluginConnectionResult Connect(IPluginHost _app)
        {
            IExtendApp app = _app as IExtendApp;
            if (app != null)
            {
                //注册
                app.Register(this,app_OnExtendModuleRequest, app_OnExtendModulePost);
                Cms.Plugins.MapExtendPluginRoute("xmlrpc", app.GetAttribute(this).WorkIndent);
            }

            blogService=new WeblogRPCService();

            //初始化设置
            attr = this.GetAttribute();
            bool isChanged=false;

            if(attr.Settings.Contains("enable_base64_image"))
            {
                WeblogRPCService.EnableBase64Images=attr.Settings["enable_base64_image"]=="yes";
            }
            else
            {
                WeblogRPCService.EnableBase64Images=false;
                attr.Settings.Set("enable_base64_image","no");
                isChanged=true;
            }

            if(isChanged)
            {
                attr.Settings.Flush();
            }

            return PluginConnectionResult.Success;
        }
        public override bool Initialize( IPluginHost host )
        {
            if ( host == null ) return false;
            m_host = host;

            // Get a reference to the 'Tools' menu item container
            ToolStripItemCollection tsMenu = m_host.MainWindow.ToolsMenu.DropDownItems;

            // Add a separator at the bottom
            m_tsSeparator = new ToolStripSeparator();
            tsMenu.Add( m_tsSeparator );

            // Add menu item 'KeePassCompare'
            m_tsmiMenuItem = new ToolStripMenuItem();
            m_tsmiMenuItem.Text = "KeePassCompare Compare!";
            m_tsmiMenuItem.Click += this.OnMenuCompare;
            tsMenu.Add( m_tsmiMenuItem );

            // Add menu item 'KeePassCompare'
            m_tsmiMenuItem2 = new ToolStripMenuItem();
            m_tsmiMenuItem2.Text = "KeePassCompare Reset Colours";
            m_tsmiMenuItem2.Click += this.OnResetColors;
            tsMenu.Add( m_tsmiMenuItem2 );

            return true;
        }
        public BulletHeightFieldShapeNode(IPluginHost host)
        {
            this.FHost = host;

            this.FHost.CreateValueInput("Resolution", 2, null, TSliceMode.Dynamic, TPinVisibility.True, out this.FPinInResolution);
            this.FPinInResolution.SetSubType2D(2, double.MaxValue, 1, 5, 5, false, false, true);
        }
		public override bool Initialize(IPluginHost host)
		{
			Contract.Requires(host != null);

			this.host = host;

			ctxEntryShowQRCode = new ToolStripMenuItem
			{
				Image = Properties.Resources.icon,
				Text = CONTEXT_MENU_ITEM_LABEL
			};
			dynQRCodes = new DynamicMenu(ctxEntryShowQRCode.DropDownItems);
			dynQRCodes.MenuClick += OnShowQRCode;

			var insertAfterIndex = host.MainWindow.EntryContextMenu.Items.IndexOfKey(INSERT_AFTER_ENTRY_KEY);
			if (insertAfterIndex != -1)
			{
				//insert after "Save Attachements"
				host.MainWindow.EntryContextMenu.Items.Insert(insertAfterIndex + 1, ctxEntryShowQRCode);
			}
			else
			{
				//add at the end
				host.MainWindow.EntryContextMenu.Items.Add(ctxEntryShowQRCode);
			}
			host.MainWindow.EntryContextMenu.Opening += OnEntryContextMenuOpening;

			return true;
		}
Beispiel #30
0
        public ConfigDialog(IPluginHost pluginHost)
        {
            InitializeComponent();
            m_PluginHost = pluginHost;

            if (File.Exists("StrengthReportLayouts.xml")) {
                m_LayoutBox = LayoutBox.LoadFromFile("StrengthReportLayouts.xml");
            } else {
                m_LayoutBox = LayoutBox.LoadFromString(Resources.LayoutsDefault);
            }

            foreach (Layout l in m_LayoutBox)
                layoutBoxBindingSource.Add(l);

            if (File.Exists("StrengthReportTemplates.xml")) {
                m_TemplateBox = TemplateBox.LoadFromFile("StrengthReportTemplates.xml");
            } else {
                m_TemplateBox = TemplateBox.LoadFromString(Resources.TemplatesDefault);
            }

            foreach (Template l in m_TemplateBox)
                templatesBinginSource.Add(l);

            tabFormat.SelectedIndex = 1;
        }
Beispiel #31
0
 public DX11LayerGroupNode(IPluginHost host, IIOFactory iofactory)
 {
     this.FHost      = host;
     this.FIOFactory = iofactory;
 }
Beispiel #32
0
 public AssimpMeshSplitNode(IPluginHost host)
 {
 }
Beispiel #33
0
 public KinectColorSpaceTextureNode(IPluginHost host)
 {
     this.InitBuffers();
 }
 /// <summary>
 /// Plugin stop entry point. You MUST free all your resources here,
 /// remove added menus, windows, pages, configurations, etc.
 /// </summary>
 /// <param name="PluginHost">The <see cref="IPluginHost"/> interface with accessable API</param>
 public abstract void OnStop(IPluginHost PluginHost);
 public KinectColorTextureNode(IPluginHost host)
 {
     this.colorimage = new byte[640 * 480 * 4];
     host.CreateTextureOutput("Texture Out", TSliceMode.Single, TPinVisibility.True, out this.FOutTexture);
 }
Beispiel #36
0
        //this method is called by vvvv when the node is created
        public virtual void SetPluginHost(IPluginHost Host)
        {
            //assign host
            FHost = Host;

            //create inputs:

            //transform
            FHost.CreateTransformInput("Transform In", TSliceMode.Dynamic, TPinVisibility.True, out FTransformIn);

            //value
            FHost.CreateValueInput("Value Input", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FValueIn);
            FValueIn.SetSubType(0, double.MaxValue, 1, 0, false, false, true);

            FHost.CreateValueInput("Set Value", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FSetValueIn);
            FSetValueIn.SetSubType(0, 1, 1, 0, true, false, false);

            //counts
            FHost.CreateValueInput("Count X", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FCountXIn);
            FCountXIn.SetSubType(1, double.MaxValue, 1, 1, false, false, true);

            FHost.CreateValueInput("Count Y", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FCountYIn);
            FCountYIn.SetSubType(1, double.MaxValue, 1, 1, false, false, true);

            //size
            FHost.CreateValueInput("Size X", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FSizeXIn);
            FSizeXIn.SetSubType(double.MinValue, double.MaxValue, 0.01, 0.9, false, false, false);

            FHost.CreateValueInput("Size Y", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FSizeYIn);
            FSizeYIn.SetSubType(double.MinValue, double.MaxValue, 0.01, 0.9, false, false, false);

            //mouse
            FHost.CreateValueInput("Mouse X", 1, null, TSliceMode.Single, TPinVisibility.True, out FMouseXIn);
            FMouseXIn.SetSubType(double.MinValue, double.MaxValue, 0.01, 0, false, false, false);

            FHost.CreateValueInput("Mouse Y", 1, null, TSliceMode.Single, TPinVisibility.True, out FMouseYIn);
            FMouseYIn.SetSubType(double.MinValue, double.MaxValue, 0.01, 0, false, false, false);

            FHost.CreateValueInput("Mouse Left", 1, null, TSliceMode.Single, TPinVisibility.True, out FLeftButtonIn);
            FLeftButtonIn.SetSubType(0, 1, 1, 0, false, true, false);

            //color
            FHost.CreateColorInput("Color", TSliceMode.Dynamic, TPinVisibility.True, out FColorIn);
            FColorIn.SetSubType(new RGBAColor(0.2, 0.2, 0.2, 1), true);

            FHost.CreateColorInput("Mouse Over Color", TSliceMode.Dynamic, TPinVisibility.True, out FOverColorIn);
            FOverColorIn.SetSubType(new RGBAColor(0.5, 0.5, 0.5, 1), true);

            FHost.CreateColorInput("Activated Color", TSliceMode.Dynamic, TPinVisibility.True, out FActiveColorIn);
            FActiveColorIn.SetSubType(new RGBAColor(1, 1, 1, 1), true);


            //create outputs
            FHost.CreateTransformOutput("Transform Out", TSliceMode.Dynamic, TPinVisibility.True, out FTransformOut);

            FHost.CreateColorOutput("Color", TSliceMode.Dynamic, TPinVisibility.True, out FColorOut);
            FColorOut.SetSubType(new RGBAColor(0.2, 0.2, 0.2, 1), true);

            FHost.CreateValueOutput("Value Output", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FValueOut);
            FValueOut.SetSubType(double.MinValue, double.MaxValue, 0.01, 0, false, false, false);

            FHost.CreateValueOutput("Active", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FActiveOut);
            FActiveOut.SetSubType(0, 1, 1, 0, false, true, false);

            FHost.CreateValueOutput("Hit", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FHitOut);
            FHitOut.SetSubType(0, 1, 1, 0, true, false, false);

            FHost.CreateValueOutput("Mouse Over", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FMouseOverOut);
            FMouseOverOut.SetSubType(0, 1, 1, 0, false, true, false);

            FHost.CreateValueOutput("Spread Counts", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out FSpreadCountsOut);
            FSpreadCountsOut.SetSubType(0, double.MaxValue, 0.01, 0, false, false, true);

            //create config pin
            FHost.CreateValueConfig("Internal Value", 1, null, TSliceMode.Dynamic, TPinVisibility.OnlyInspector, out FInternalValueConfig);
            FInternalValueConfig.SetSubType(0, double.MaxValue, 1, 0, false, false, true);

            FControllerGroups = new ArrayList();
        }
Beispiel #37
0
 public KinectDepthTextureNodeRaw(IPluginHost host)
 {
     this.InitBuffers();
 }
Beispiel #38
0
        public override bool Initialize(IPluginHost host)
        {
            if (host == null)
            {
                return(false);
            }

            mfMainForm             = host.MainWindow;
            mfMainForm.FileOpened += MainForm_FileOpened;

            //menu tool strip
            ToolStripMenuItem tsmiMenuToolStripEdit = (ToolStripMenuItem)mfMainForm.MainMenu.Items["m_menuEntry"];

            //tool strip
            CustomToolStripEx tsmiToolStripEdit = (CustomToolStripEx)mfMainForm.Controls["m_toolMain"];

            //item context menu
            Control[] lvEntries = mfMainForm.Controls.Find("m_lvEntries", true);

            //new window event
            GlobalWindowManager.WindowAdded += OnWindowAdded;

            //create menu item
            tsmiAddOpenIdEntry = new ToolStripMenuItem
            {
                Text  = csAddOpenIdEntry,
                Image = new Bitmap(aKeePassOpenIdExtAssembly.GetManifestResourceStream("KeePassOpenId.Resources.New.png")),
            };

            tsmiAddOpenIdEntry.Click += new EventHandler(OnEntryAdd);

            //add in our menu item to the menu tool strip
            if (tsmiMenuToolStripEdit != null)
            {
                //find the regular "Add Entry" item so we can put ours right after it
                for (int i = 0; i < tsmiMenuToolStripEdit.DropDownItems.Count; i++)
                {
                    if (tsmiMenuToolStripEdit.DropDownItems[i] is ToolStripMenuItem)
                    {
                        //if (((ToolStripMenuItem)item).Name == "m_ctxEntryAdd")
                        if (((ToolStripMenuItem)tsmiMenuToolStripEdit.DropDownItems[i]).Text == "&Add Entry...")
                        {
                            tsmiMenuToolStripEdit.DropDownItems.Insert(i + 1, tsmiAddOpenIdEntry);
                            break;
                        }
                    }
                }
            }

            //add in our menu item to the tool strip
            if (tsmiToolStripEdit != null)
            {
                //find the regular "Add Entry" item so we can put ours right after it
                for (int i = 0; i < tsmiToolStripEdit.Items.Count; i++)
                {
                    if (tsmiToolStripEdit.Items[i] is ToolStripSplitButton)
                    {
                        if (((ToolStripSplitButton)tsmiToolStripEdit.Items[i]).Name == "m_tbAddEntry")
                        {
                            ToolStripMenuItem tsmiAddOpenId = new ToolStripMenuItem
                            {
                                Text  = csAddOpenIdEntry,
                                Image = new Bitmap(aKeePassOpenIdExtAssembly.GetManifestResourceStream("KeePassOpenId.Resources.New.png")),
                            };

                            tsmiAddOpenId.Click += new EventHandler(OnEntryAdd);
                            ((ToolStripSplitButton)tsmiToolStripEdit.Items[i]).DropDownItems.Add(tsmiAddOpenId);

                            break;
                        }
                    }
                }
            }

            //add in our menu item to the context menu
            if (lvEntries != null && lvEntries.Length == 1)
            {
                CustomContextMenuStripEx ccmsItemContextMenu = (CustomContextMenuStripEx)((CustomListViewEx)lvEntries[0]).ContextMenuStrip;
                //find the regular "Add Entry" item so we can put ours right after it
                for (int i = 0; i < ccmsItemContextMenu.Items.Count; i++)
                {
                    if (ccmsItemContextMenu.Items[i] is ToolStripMenuItem)
                    {
                        if (((ToolStripMenuItem)ccmsItemContextMenu.Items[i]).Name == "m_ctxEntryAdd")
                        {
                            ToolStripMenuItem tsmiAddOpenId = new ToolStripMenuItem
                            {
                                Text  = csAddOpenIdEntry,
                                Image = new Bitmap(aKeePassOpenIdExtAssembly.GetManifestResourceStream("KeePassOpenId.Resources.New.png")),
                            };

                            tsmiAddOpenId.Click += new EventHandler(OnEntryAdd);
                            ccmsItemContextMenu.Items.Insert(i + 1, tsmiAddOpenId);

                            ((ToolStripMenuItem)ccmsItemContextMenu.Items[i]).EnabledChanged += KeePassOpenIdExt_EnabledChanged;
                            break;
                        }
                    }
                }
            }

            return(true);
        }
Beispiel #39
0
 public LauncherSiloPluginManager(IPluginHost Host) : base(Host)
 {
 }
 private static PwGroup template_group(IPluginHost m_host)
 {
     return(m_host.Database.RootGroup.FindGroup(m_host.Database.EntryTemplatesGroup, true));
 }
Beispiel #41
0
 public override bool Initialize(IPluginHost host)
 {
     mPluginHost = host;
     MessageBox.Show("Sample Plugin Initialized!");
     return(true);
 }
Beispiel #42
0
 void graphbuilder_OnRenderRequest(IDX11ResourceDataRetriever sender, IPluginHost host)
 {
     this.rendermanager.Render(sender, host);
 }
 private bool AddInitForm(out NetCheatX.Core.UI.XForm form, IPluginHost host)
 {
     // Initialize our Target Manager Init form into form
     form = new UI.Init(this, _manager, host);
     return(true);
 }
Beispiel #44
0
 public TLValueSlice(IPluginHost Host, TLBasePin Pin, int SliceIndex, int PinsOrder) : base(Host, Pin, SliceIndex, PinsOrder)
 {
 }
 public BulletGetRigidBodyMesh(IPluginHost host)
 {
     this.FHost = host;
     this.FHost.CreateMeshOutput("Mesh", TSliceMode.Dynamic, TPinVisibility.True, out this.FMeshOut);
 }
Beispiel #46
0
 public void Initialize(IPluginHost pluginHost, string gameCode)
 {
     this.pluginHost = pluginHost;
     this.gameCode   = gameCode;
 }
Beispiel #47
0
 // Clean up
 public void Dispose(IPluginHost host)
 {
     _communicator = null;
     _version      = null;
 }
Beispiel #48
0
        public void Initialize(IPluginHost host)
        {
            _host = host;

            _host.OnStringDataReceived += OnStringDataReceived;
        }
Beispiel #49
0
 public InfoNode(IPluginHost host)
 {
 }
Beispiel #50
0
 // Register our PC Communicator
 public void Initialize(IPluginHost host)
 {
     _version = new ObjectVersion(1, 0);
     host.Communicators.Add(this, _communicator = new Communicator());
 }
Beispiel #51
0
 public void Dispose(IPluginHost host)
 {
     _host = null;
 }
Beispiel #52
0
 public void Initialize(IPluginHost pluginHost)
 {
     this.pluginHost = pluginHost;
 }
 public Plugin(IPluginHost _host, PluginInfo _info)
 {
     Host = _host;
     Info = _info;
 }
Beispiel #54
0
 public void Initialize(IPluginHost host)
 {
     _host    = host;
     _version = new ObjectVersion(1, 0);
 }
Beispiel #55
0
 /// <summary>
 /// The <c>Initialize</c> function is called by KeePass when
 /// you should initialize your plugin (create menu items, etc.).
 /// </summary>
 /// <param name="host">Plugin host interface. By using this
 /// interface, you can access the KeePass main window and the
 /// currently opened database.</param>
 /// <returns>You must return <c>true</c> in order to signal
 /// successful initialization. If you return <c>false</c>,
 /// KeePass unloads your plugin (without calling the
 /// <c>Terminate</c> function of your plugin).</returns>
 public virtual bool Initialize(IPluginHost host)
 {
     return(host != null);
 }
Beispiel #56
0
 public BatchInstaller(IPluginHost host) : base(host)
 {
 }
Beispiel #57
0
        public override bool Initialize(IPluginHost host)
        {
            Util.Log("Plugin Initialize");

            Debug.Assert(host != null);
            if (host == null)
            {
                return(false);
            }
            pluginHost = host;

            // Custom settings
            Config = new Configuration(pluginHost.CustomConfig);

            // Require a signed version file
            UpdateCheckEx.SetFileSigKey(UpdateUrl, UpdateKey);

            // Load menus icon resource
            menuImage = Properties.Resources.Download_32;

            // Add Entry Context menu items
            entrySeparator            = new ToolStripSeparator();
            entryDownloadFaviconsItem = new ToolStripMenuItem("Download &Favicons", menuImage, DownloadFaviconsEntry_Click);
            pluginHost.MainWindow.EntryContextMenu.Items.Add(entrySeparator);
            pluginHost.MainWindow.EntryContextMenu.Items.Add(entryDownloadFaviconsItem);

            // Add Group Context menu items
            groupSeparator            = new ToolStripSeparator();
            groupDownloadFaviconsItem = new ToolStripMenuItem("Download Fa&vicons (recursively)", menuImage, DownloadFaviconsGroup_Click);
            pluginHost.MainWindow.GroupContextMenu.Items.Add(groupSeparator);
            pluginHost.MainWindow.GroupContextMenu.Items.Add(groupDownloadFaviconsItem);

            //////////////////////////////////////////////////////////////////////////

            // Tools -> YAFD -> SubItems

            // Automatic prefix URLs with http(s)://
            toolsSubItemsPrefixURLsItem         = new ToolStripMenuItem("Automatic prefix URLs with http(s)://", null, PrefixURLsMenu_Click); // TODO: i18n?
            toolsSubItemsPrefixURLsItem.Checked = Config.GetAutomaticPrefixURLs();

            // Use title field if URL field is empty
            toolsSubItemsTitleFieldItem         = new ToolStripMenuItem("Use title field if URL field is empty", null, TitleFieldMenu_Click); // TODO: i18n?
            toolsSubItemsTitleFieldItem.Checked = Config.GetUseTitleField();

            // Update last modified date when adding/updating icons
            toolsSubItemsUpdateModifiedItem         = new ToolStripMenuItem("Update entry last modification time", null, LastModifiedMenu_Click); // TODO: i18n?
            toolsSubItemsUpdateModifiedItem.Checked = Config.GetUpdateLastModified();

            // Add Tools menu items
            toolsMenuSeparator = new ToolStripSeparator();

            toolsMenuDropDownItems = new ToolStripMenuItem[]
            {
                toolsSubItemsPrefixURLsItem,
                toolsSubItemsTitleFieldItem,
                toolsSubItemsUpdateModifiedItem,
#if DEBUG
                new ToolStripMenuItem("Reset Icons", null, ResetIconsMenu_Click)
#endif
            };
            toolsMenuYAFD = new ToolStripMenuItem("Yet Another Favicon Downloader", menuImage, toolsMenuDropDownItems);

            pluginHost.MainWindow.ToolsMenu.DropDownItems.Add(toolsMenuSeparator);
            pluginHost.MainWindow.ToolsMenu.DropDownItems.Add(toolsMenuYAFD);

            return(true);
        }
 /// <summary>
 /// Plugin activation entry point
 /// </summary>
 /// <param name="PluginHost">The <see cref="IPluginHost"/> interface with accessable API</param>
 public abstract void OnActivate(IPluginHost PluginHost);
Beispiel #59
0
 public RNode(IPluginHost host)
 {
     SRComms.MessageSent += new EventHandler(SRComms_MessageSent);
 }
 public Polygon2dNode(IPluginHost Host) : base(Host)
 {
 }