コード例 #1
0
ファイル: User32.cs プロジェクト: CarJem/GenerationsLib
 public static extern bool DeleteMenu(IntPtr hMenu, int uPosition,
                                      MF uFlags);
コード例 #2
0
ファイル: user32.cs プロジェクト: xinqinglhj/JkhFileSearch
 public static extern int InsertMenu(IntPtr hMenu, int Position, MF Flags, int NewId, string text);
コード例 #3
0
 public static partial BOOL EnableMenuItem(IntPtr hMenu, SC uIDEnableItem, MF uEnable);
コード例 #4
0
 public static MF EnableMenuItem(IntPtr hMenu, SC uIDEnableItem, MF uEnable)
 {
     return((MF)Standard.NativeMethods._EnableMenuItem(hMenu, uIDEnableItem, uEnable));
 }
コード例 #5
0
 public Employ(string position, MF type)
 {
     Position      = position;
     Type          = type;
     Announcement += NewAnnouncement;
 }
コード例 #6
0
 public static extern bool DeleteMenu(IntPtr hMenu, int uPosition,
     MF uFlags);
コード例 #7
0
 public static void RemoveMenu(IntPtr hMenu, SC uPosition, MF uFlags)
 {
     if (!_RemoveMenu(hMenu, (uint)uPosition, (uint)uFlags))
     {
         throw new Win32Exception();
     }
 }
コード例 #8
0
 private void Home_Tapped(object sender, TappedRoutedEventArgs e)
 {
     MF.Navigate(typeof(Home));
 }
コード例 #9
0
 private void Favorite_Tapped(object sender, TappedRoutedEventArgs e)
 {
     MF.Navigate(typeof(ListFavorite));
 }
コード例 #10
0
 private void MF_Loaded(object sender, RoutedEventArgs e)
 {
     MF.Navigate(typeof(Pages.Home));
 }
コード例 #11
0
 private void btnFavorite_Click(object sender, RoutedEventArgs e)
 {
     MF.Navigate(typeof(ListFavorite), FavoriteProduct);// chỗ này nè
 }
コード例 #12
0
 private void ListOrder_Tapped(object sender, TappedRoutedEventArgs e)
 {
     MF.Navigate(typeof(CartList));
 }
コード例 #13
0
 private static extern int _EnableMenuItem(IntPtr hMenu, SC uIDEnableItem, MF uEnable);
コード例 #14
0
 public static partial BOOL RemoveMenu(IntPtr hMenu, uint uPosition, MF uFlags);
コード例 #15
0
 public static extern int EnableMenuItem(IntPtr hMenu, SC uIDEnableItem, MF uEnable);
コード例 #16
0
        public void setup()
        {
            //TextAsset MembershipFunctTextAsset =
            //    Resources.Load("MembershipFunctions") as TextAsset;
            LinguisticVariable = new LinguisticVariable();
            MFs = new List <MembershipFunction>();
            LRs = new List <LinguisticRule>();
            MFs.Add(MembershipFunction.Generate("EasyFight", "Triangle", new double[] { -1, 3, 5 }, 5));
            MFs.Add(MembershipFunction.Generate("NormalFight", "Trapezoid", new double[] { 4, 5, 9, 11 }, 9));
            MFs.Add(MembershipFunction.Generate("HardFight", "Triangle", new double[] { 10, 15, 17 }, 15));
            LRs.Add(new LinguisticRule(
                        "HardFight",
                        "Health High and Power High",
                        FuzzyImplication.Lukasiewicz,
                        FuzzyOperator.Probabilistic));
            LRs.Add(new LinguisticRule(
                        "NormalFight",
                        "Health Low and Power Medium",
                        FuzzyImplication.KleeneDienes,
                        FuzzyOperator.Probabilistic));
            LRs.Add(new LinguisticRule(
                        "EasyFight",
                        "Health Medium and Power Low",
                        FuzzyImplication.Larson,
                        FuzzyOperator.MinMax));
            JsonLingVar =
                @"
{
    ""Version"" : """ + Version + @""",
    ""LinguisticVariable"" : """ + Name + @""",
    ""Type"" : """ + Type + @""",
    ""MinimumValue"" : " + minVal + @",
    ""RangeLength"" : " + RangeLen + @",
    ""LinguisticValues"" : 
    [
    ";
            foreach (MembershipFunction MF in MFs)
            {
                JsonLingVar += MF.encodeLinguisticJson().Print(true);
                if (!MF.Equals(MFs[MFs.Count - 1]))
                {
                    JsonLingVar += ",";
                }
            }
            JsonLingVar +=
                @"
    ],
    ""LinguisticRule"" : 
    [";
            foreach (LinguisticRule LR in LRs)
            {
                JsonLingVar += LR.encodeLinguisticJson().Print(true);
                if (!LR.Equals(LRs[LRs.Count - 1]))
                {
                    JsonLingVar += ",";
                }
            }
            JsonLingVar +=
                @"]
}
";
        }
コード例 #17
0
ファイル: Util.cs プロジェクト: mohammadul/addondev
 static void ShellOperation(IntPtr hwnd, string[] files, string toDir, MF.Win32API.FOFunc func)
 {
     MF.Win32API.SHFILEOPSTRUCT shellOpStruct = new MF.Win32API.SHFILEOPSTRUCT();
     shellOpStruct.hwnd = hwnd;
     shellOpStruct.wFunc = func;
     //var form = string.Join(@"\0", files) + @"\0" + @"\0";
     var form = string.Empty;
     foreach (var f in files) {
         form += f + '\0';
     }
     form += '\0';
     shellOpStruct.pFrom = form;
     shellOpStruct.pTo = toDir;
     MF.Win32API.SHFileOperation(ref shellOpStruct);
 }
コード例 #18
0
        private void CaptureStillImages(MediaItem item)
        {
            using (var releaser = new ComReleaser())
            {
                MF.CreateVideoDeviceSource(item.DeviceItem.SymLink, out IMFMediaSource source);
                releaser.Add(source);
                source.CreatePresentationDescriptor(out IMFPresentationDescriptor presDesc);
                releaser.Add(presDesc);
                presDesc.GetStreamDescriptorByIndex(item.DescIndex, out bool selected, out IMFStreamDescriptor strmDesc);
                releaser.Add(strmDesc);
                strmDesc.GetMediaTypeHandler(out IMFMediaTypeHandler handler);
                releaser.Add(handler);
                handler.GetMediaTypeByIndex(item.TypeIndex, out IMFMediaType type);
                handler.SetCurrentMediaType(type);

                MF.CreateSourceReaderFromMediaSource(source, out IMFSourceReader reader);
                if (reader == null)
                {
                    return;
                }
                releaser.Add(reader);

                IMFTransform          transform      = null;
                MFTOutputDataBuffer[] outSamples     = null;
                IMFSample             outRgb24Sample = null;
                IMFMediaBuffer        outRgb24Buffer = null;

                int rgbSize = item.Width * item.Height * 3;

                var needToConvert = item.SubType != MFMediaType.RGB24;
                if (needToConvert)
                {
                    var processor = new VideoProcessorMFT();
                    releaser.Add(processor);
                    transform = (IMFTransform)processor;
                    HR(transform.SetInputType(0, type, MFTSetTypeFlags.None));
                    var rgbMediaType = MF.CreateMediaType();
                    releaser.Add(rgbMediaType);
                    HR(type.CopyAllItems(rgbMediaType));
                    HR(rgbMediaType.SetGUID(MFAttributesClsid.MF_MT_SUBTYPE, MFMediaType.RGB24));
                    HR(rgbMediaType.SetUINT32(MFAttributesClsid.MF_MT_DEFAULT_STRIDE, 3 * item.Width));
                    HR(rgbMediaType.SetUINT32(MFAttributesClsid.MF_MT_SAMPLE_SIZE, rgbSize));
                    HR(transform.SetOutputType(0, rgbMediaType, MFTSetTypeFlags.None));

                    outSamples     = new MFTOutputDataBuffer[1];
                    outSamples[0]  = new MFTOutputDataBuffer();
                    outRgb24Sample = MF.CreateSample();
                    releaser.Add(outRgb24Sample);
                    outRgb24Buffer = MF.CreateMemoryBuffer(rgbSize);
                    releaser.Add(outRgb24Buffer);
                    outRgb24Sample.AddBuffer(outRgb24Buffer);
                    outSamples[0].pSample = Marshal.GetIUnknownForObject(outRgb24Sample);
                }

                int frames = 0;
                while (!stopEvent.WaitOne(0))
                {
                    var hrRS = reader.ReadSample(
                        (int)MF_SOURCE_READER.AnyStream,
                        MF_SOURCE_READER_CONTROL_FLAG.None,
                        out int streamIndex,
                        out MF_SOURCE_READER_FLAG flags,
                        out long timeStamp,
                        out IMFSample sample
                        );

                    if (sample != null)
                    {
                        try
                        {
                            IMFSample rgbSample = sample;

                            if (transform != null)
                            {
                                while (true)
                                {
                                    var hrPO = transform.ProcessOutput(
                                        MFTProcessOutputFlags.None,
                                        1,
                                        outSamples,
                                        out ProcessOutputStatus status
                                        );
                                    if (hrPO.Succeeded())
                                    {
                                        ConsumeBuffer(outRgb24Buffer, item);
                                        frames++;
                                    }
                                    else
                                    {
                                        break;
                                    }
                                }
                                var hrPI = transform.ProcessInput(0, sample, 0);
                                continue;
                            }

                            rgbSample.GetBufferByIndex(0, out IMFMediaBuffer buff);
                            if (ConsumeBuffer(buff, item))
                            {
                                frames++;
                            }
                            else
                            {
                                return;
                            }
                        }
                        finally
                        {
                            Marshal.ReleaseComObject(sample);
                        }
                    }
                }
            }
        }
コード例 #19
0
 public static MF EnableMenuItem(IntPtr hMenu, SC uIDEnableItem, MF uEnable)
 {
     // Returns the previous state of the menu item, or -1 if the menu item does not exist.
     int iRet = _EnableMenuItem(hMenu, uIDEnableItem, uEnable);
     return (MF)iRet;
 }
コード例 #20
0
ファイル: Program.cs プロジェクト: ahmed98khaled/SimpleAIO
        private static void OnLoadingComplete()
        {
            if (ObjectManager.Player == null)
            {
                return;
            }
            buff.OnGameLoad();
            try
            {
                switch (GameObjects.Player.CharacterName)
                {
                case "Jayce":
                    Jayce.OnGameLoad();
                    break;

                case "DrMundo":
                    DrMundo.OnGameLoad();
                    break;

                case "Veigar":
                    veigar.OnGameLoad();
                    break;

                case "MonkeyKing":
                    Wukong.OnGameLoad();
                    break;

                case "Lux":
                    lux.OnGameLoad();
                    break;

                case "MissFortune":
                    MF.OnGameLoad();
                    break;

                case "Ivern":
                    ivern.OnGameLoad();
                    break;

                case "Trundle":
                    Trundle.OnGameLoad();
                    break;

                case "Warwick":
                    Warwick.OnGameLoad();
                    break;

                case "Ryze":
                    ryze.OnGameLoad();
                    break;

                case "RekSai":
                    RekSai.OnGameLoad();
                    break;

                case "Taliyah":
                    Taliyah.OnGameLoad();
                    break;

                case "Gangplank":
                    gankplank.OnGameLoad();
                    break;

                case "Tryndamere":
                    Tryndamere.OnGameLoad();
                    break;

                case "Anivia":
                    Anivia.OnGameLoad();
                    break;

                case "Garen":
                    Garen.OnGameLoad();
                    break;

                case "Gwen":
                    Gwen.OnGameLoad();
                    break;

                case "Illaoi":
                    Illaoi.OnGameLoad();
                    break;

                case "Mordekaiser":
                    Mordekaiser.OnGameLoad();
                    break;

                case "Rumble":
                    Rumble.OnGameLoad();
                    break;

                case "XinZhao":
                    XinZhao.OnGameLoad();
                    break;

                case "Renekton":
                    Renekton.OnGameLoad();
                    break;

                case "Chogath":
                    Chogath.OnGameLoad();
                    break;

                case "Urgot":
                    Urgot.OnGameLoad();
                    break;

                case "Kayle":
                    Kayle.OnGameLoad();
                    break;

                default:
                    Game.Print("<font color='#b756c5' size='25'>SimpleAIO Does Not Support :" + ObjectManager.Player.CharacterName + "</font>");
                    Console.WriteLine("Not Supported " + ObjectManager.Player.CharacterName);
                    break;
                }
            }
            catch (Exception ex)
            {
                Game.Print("Error in loading");
                Console.WriteLine("Error in loading :");
                Console.WriteLine(ex);
            }
        }
コード例 #21
0
 private static extern int _EnableMenuItem(IntPtr hMenu, SC uIDEnableItem, MF uEnable);
コード例 #22
0
ファイル: Win32.cs プロジェクト: kgober/VT05
 public static extern Boolean AppendMenu(
     IntPtr hMenu,
     MF uFlags,
     UIntPtr uIDNewItem,
     String lpNewItem);